~ubuntu-branches/ubuntu/intrepid/samba/intrepid-updates

« back to all changes in this revision

Viewing changes to debian/patches/usershare.patch

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2008-06-02 09:01:46 UTC
  • mfrom: (0.25.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080602090146-92ur4nx39ccg708r
Tags: 2:3.0.30-2ubuntu1
* Merge from debian unstable, remaining changes:
  * debian/patches/VERSION.patch
    - set SAMABA_VERSION_VENDOR_SUFFIX to Ubuntu
  * debian/smb.conf
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] shares, and a comment about
      "value users = %S to show users how to restrict access to 
      \\server\useranem to only username.
    - Add map to guest = Bad user, maps bad username to guest access.
      (LP: #32067)
  * debian/samba-common.postinst:
    - Fix upgrade from a first installation done with feisty, edgy, or dapper.
      (LP: #201059)
    - When populating the new sambashare group, it's not an error if the user
      simply doesn't exist; test for this case and the install continue 
      instead of aborting. (LP: #206036)
  * debian/smba-common.config:
    - do not change priority to HIGH if dhclient3 is installed
    - used priority medium instead of hight for the workgroup question
  * debian/winbind.files
    - insclude additional files
  * debian/patches/fix-documentation.patch:
    - fix typos in net(8) and smb.conf(5) man pages
  * debian/mksambapasswd.awk:
    - Don't add user with UID less than 1000 to smbpasswd.
  * debian/samba.init:
    - add 'status' option for LSB conformance.
  * Updated control version.
  * Dropped Changes:
    - Dropped debian/patches/fix-smbprinting-os2.patch. Accepted upstream.
    - Dropped debian/patches/fix-documentation.patch. Accepted upstream.
     

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 
9
9
Status wrt upstream: Debian-specific
10
10
 
11
 
Index: samba-3.0.28a/docs/manpages/smb.conf.5
 
11
Index: samba-3.0.29/docs/manpages/smb.conf.5
12
12
===================================================================
13
 
--- samba-3.0.28a.orig/docs/manpages/smb.conf.5
14
 
+++ samba-3.0.28a/docs/manpages/smb.conf.5
15
 
@@ -253,7 +253,7 @@
16
 
 .PP
17
 
 usershare path
18
 
 .RS 3n
19
 
-Points to the directory containing the user defined share definitions. The filesystem permissions on this directory control who can create user defined shares.
20
 
+Points to the directory containing the user-defined share definitions. The filesystem permissions on this directory control who can create user-defined shares.
21
 
 .RE
22
 
 .PP
23
 
 usershare prefix allow list
24
 
@@ -271,32 +271,7 @@
25
 
 Names a pre-existing share used as a template for creating new usershares. All other share parameters not specified in the user defined share definition are copied from this named share.
 
13
--- samba-3.0.29.orig/docs/manpages/smb.conf.5
 
14
+++ samba-3.0.29/docs/manpages/smb.conf.5
 
15
@@ -287,31 +287,7 @@
 
16
 Names a pre\-existing share used as a template for creating new usershares\. All other share parameters not specified in the user defined share definition are copied from this named share\.
26
17
 .RE
27
18
 .PP
28
19
-To allow members of the UNIX group
30
21
-to create user defined shares, create the directory to contain the share definitions as follows:
31
22
-.PP
32
23
-Become root:
33
 
-
 
24
-.sp
 
25
-.RS 4
34
26
-.nf
35
 
-
36
27
-mkdir /usr/local/samba/lib/usershares
37
28
-chgrp foo /usr/local/samba/lib/usershares
38
29
-chmod 1770 /usr/local/samba/lib/usershares
39
 
-
40
30
-.fi
 
31
-.RE
41
32
-.PP
42
33
-Then add the parameters
43
 
-
44
34
-.sp
45
 
-
 
35
-.RS 4
46
36
-.nf
47
 
-
48
 
-       usershare path = /usr/local/samba/lib/usershares
49
 
-       usershare max shares = 10 # (or the desired number of shares)
50
 
-
 
37
-       \fIusershare path = /usr/local/samba/lib/usershares\fR
 
38
-       \fIusershare max shares = 10\fR # (or the desired number of shares)
51
39
-.fi
 
40
-.RE
 
41
-.sp
52
42
-to the global section of your
53
 
-\fIsmb.conf\fR. Members of the group foo may then manipulate the user defined shares using the following commands.
54
 
+Members of the \fBsambashare\fR group can manipulate the user-defined shares using the following commands:
 
43
-\fIsmb\.conf\fR\. Members of the group foo may then manipulate the user defined shares using the following commands\.
 
44
+Members of the \fBsambashare\fR group can manipulate the user defined shares using the following commands:
55
45
 .PP
56
46
 net usershare add sharename path [comment] [acl] [guest_ok=[y|n]]
57
 
 .RS 3n
58
 
@@ -6964,9 +6939,9 @@
59
 
 .PP
60
 
 usershare path (G)
61
 
 .RS 3n
62
 
-This parameter specifies the absolute path of the directory on the filesystem used to store the user defined share definition files. This directory must be owned by root, and have no access for other, and be writable only by the group owner. In addition the "sticky" bit must also be set, restricting rename and delete to owners of a file (in the same way the /tmp directory is usually configured). Members of the group owner of this directory are the users allowed to create usershares. If this parameter is undefined then no user defined shares are allowed.
63
 
+This parameter specifies the absolute path of the directory on the filesystem used to store the user-defined share definition files. This directory must be owned by root, and have no access for other, and be writable only by the group owner. In addition the "sticky" bit must also be set, restricting rename and delete to owners of a file (in the same way the /tmp directory is usually configured). Members of the group owner of this directory are the users allowed to create usershares. If this parameter is undefined then no user-defined shares are allowed.
 
47
 .RS 4
 
48
@@ -8503,23 +8479,23 @@
 
49
 .RS 4
 
50
 This parameter specifies the absolute path of the directory on the filesystem used to store the user defined share definition files\. This directory must be owned by root, and have no access for other, and be writable only by the group owner\. In addition the "sticky" bit must also be set, restricting rename and delete to owners of a file (in the same way the /tmp directory is usually configured)\. Members of the group owner of this directory are the users allowed to create usershares\. If this parameter is undefined then no user defined shares are allowed\.
64
51
 .sp
65
 
-For example, a valid usershare directory might be /usr/local/samba/lib/usershares, set up as follows.
 
52
-For example, a valid usershare directory might be /usr/local/samba/lib/usershares, set up as follows\.
66
53
+For example, on Debian the default usershare directory of /var/lib/samba/usershares is set up as follows.
67
54
 .sp
68
55
 
69
 
 
70
 
@@ -6974,16 +6949,16 @@
71
 
 
 
56
 .sp
 
57
 .RS 4
72
58
 .nf
73
 
 
74
 
-       ls -ld /usr/local/samba/lib/usershares/
75
 
-       drwxrwx--T  2 root power_users 4096 2006-05-05 12:27 /usr/local/samba/lib/usershares/
76
 
+       ls -ld /var/lib/samba/usershares/
77
 
+       drwxrwx--T  2 root sambashare 4096 2006-05-05 12:27 /var/lib/samba/usershares/
 
59
-       ls \-ld /usr/local/samba/lib/usershares/
 
60
-       drwxrwx\-\-T  2 root power_users 4096 2006\-05\-05 12:27 /usr/local/samba/lib/usershares/
 
61
+       ls \-ld /var/lib/samba/usershares/
 
62
+       drwxrwx\-\-T  2 root sambashare 4096 2006\-05\-05 12:27 /var/lib/samba/usershares/
78
63
        
79
64
 .fi
80
 
 
81
 
 .sp
82
 
-In this case, only members of the group "power_users" can create user defined shares.
 
65
 .RE
 
66
 .sp
 
67
 .sp
 
68
-In this case, only members of the group "power_users" can create user defined shares\.
83
69
+In this case, only members of the group "sambashare" can create user defined shares.
84
70
 .sp
85
71
 Default:
86
 
-\fB\fIusershare path\fR = NULL \fR
 
72
-\fI\fIusershare path\fR\fR\fI = \fR\fINULL\fR\fI \fR
87
73
+\fB\fIusershare path\fR = /var/lib/samba/usershares \fR
88
74
 .RE
89
 
 .PP
 
75
 
90
76
 usershare prefix allow list (G)
91
 
Index: samba-3.0.28a/docs/manpages/net.8
 
77
Index: samba-3.0.29/docs/manpages/net.8
92
78
===================================================================
93
 
--- samba-3.0.28a.orig/docs/manpages/net.8
94
 
+++ samba-3.0.28a/docs/manpages/net.8
95
 
@@ -675,9 +675,9 @@
96
 
 Store a secret for the sepcified domain, used primarily for domains that use idmap_ldap as a backend. In this case the secret is used as the password for the user DN used to bind to the ldap server.
97
 
 .SS "USERSHARE"
98
 
 .PP
99
 
-Starting with version 3.0.23, a Samba server now supports the ability for non-root users to add user define shares to be exported using the "net usershare" commands.
100
 
+Starting with version 3.0.23, a Samba server now supports the ability for non-root users to add user-defined shares to be exported using the "net usershare" commands.
101
 
 .PP
102
 
-To set this up, first set up your smb.conf by adding to the [global] section : usershare path = /usr/local/samba/lib/usershares Next create the directory /usr/local/samba/lib/usershares, change the owner to root and set the group owner to the UNIX group who should have the ability to create usershares, for example a group called "serverops". Set the permissions on /usr/local/samba/lib/usershares to 01770. (Owner and group all access, no access for others, plus the sticky bit, which means that a file in that directory can be renamed or deleted only by the owner of the file). Finally, tell smbd how many usershares you will allow by adding to the [global] section of smb.conf a line such as : usershare max shares = 100. To allow 100 usershare definitions. Now, members of the UNIX group "serverops" can create user defined shares on demand using the commands below.
103
 
+Members of the UNIX group "sambashare" can create user-defined shares on demand using the commands below.
 
79
--- samba-3.0.29.orig/docs/manpages/net.8
 
80
+++ samba-3.0.29/docs/manpages/net.8
 
81
@@ -662,7 +662,7 @@
 
82
 .PP
 
83
 Starting with version 3\.0\.23, a Samba server now supports the ability for non\-root users to add user defined shares to be exported using the "net usershare" commands\.
 
84
 .PP
 
85
-To set this up, first set up your smb\.conf by adding to the [global] section: usershare path = /usr/local/samba/lib/usershares Next create the directory /usr/local/samba/lib/usershares, change the owner to root and set the group owner to the UNIX group who should have the ability to create usershares, for example a group called "serverops"\. Set the permissions on /usr/local/samba/lib/usershares to 01770\. (Owner and group all access, no access for others, plus the sticky bit, which means that a file in that directory can be renamed or deleted only by the owner of the file)\. Finally, tell smbd how many usershares you will allow by adding to the [global] section of smb\.conf a line such as : usershare max shares = 100\. To allow 100 usershare definitions\. Now, members of the UNIX group "serverops" can create user defined shares on demand using the commands below\.
 
86
+Members of the UNIX group "sambashare" can create user defined shares on demand using the commands below.
104
87
 .PP
105
88
 The usershare commands are:
106
 
 .IP "" 3n
107
 
Index: samba-3.0.28a/source/param/loadparm.c
 
89
 .IP "" 4
 
90
Index: samba-3.0.29/source/param/loadparm.c
108
91
===================================================================
109
 
--- samba-3.0.28a.orig/source/param/loadparm.c
110
 
+++ samba-3.0.28a/source/param/loadparm.c
 
92
--- samba-3.0.29.orig/source/param/loadparm.c
 
93
+++ samba-3.0.29/source/param/loadparm.c
111
94
@@ -1689,7 +1689,7 @@
112
95
        pstrcat(s, "/usershares");
113
96
        string_set(&Globals.szUsersharePath, s);
117
100
        /* By default disallow sharing of directories not owned by the sharer. */
118
101
        Globals.bUsershareOwnerOnly = True;
119
102
        /* By default disallow guest access to usershares. */
120
 
Index: samba-3.0.28a/docs/htmldocs/manpages/smb.conf.5.html
 
103
Index: samba-3.0.29/docs/htmldocs/manpages/smb.conf.5.html
121
104
===================================================================
122
 
--- samba-3.0.28a.orig/docs/htmldocs/manpages/smb.conf.5.html
123
 
+++ samba-3.0.28a/docs/htmldocs/manpages/smb.conf.5.html
 
105
--- samba-3.0.29.orig/docs/htmldocs/manpages/smb.conf.5.html
 
106
+++ samba-3.0.29/docs/htmldocs/manpages/smb.conf.5.html
124
107
@@ -164,8 +164,8 @@
125
108
        their own share definitions has been added. This capability is called <span class="emphasis"><em>usershares</em></span> and
126
109
        is controlled by a set of parameters in the [global] section of the smb.conf.
132
115
                can be shared. Only directories below the pathnames in this list are permitted.</p></dd><dt><span class="term">usershare prefix deny list</span></dt><dd><p>Comma-separated list of absolute pathnames restricting what directories
133
116
                can be shared. Directories below the pathnames in this list are prohibited.</p></dd><dt><span class="term">usershare template share</span></dt><dd><p>Names a pre-existing share used as a template for creating new usershares.
134
117
                All other share parameters not specified in the user defined share definition
135
 
@@ -4509,25 +4509,25 @@
136
 
        </p><p>Default: <span class="emphasis"><em><em class="parameter"><code>usershare owner only</code></em> = <code class="literal">True</code>
137
 
 </em></span>
138
 
 </p></dd><dt><span class="term"><a name="USERSHAREPATH"></a>usershare path (G)</span></dt><dd><p>This parameter specifies the absolute path of the directory on the
139
 
-       filesystem used to store the user defined share definition files.
140
 
+       filesystem used to store the user-defined share definition files.
141
 
        This directory must be owned by root, and have no access for
142
 
        other, and be writable only by the group owner. In addition the
143
 
        "sticky" bit must also be set, restricting rename and delete to
144
 
        owners of a file (in the same way the /tmp directory is usually configured).
145
 
        Members of the group owner of this directory are the users allowed to create
146
 
-       usershares. If this parameter is undefined then no user defined
147
 
+       usershares. If this parameter is undefined then no user-defined
148
 
        shares are allowed.
149
 
        </p><p>
150
 
-       For example, a valid usershare directory might be /usr/local/samba/lib/usershares,
151
 
-       set up as follows.
152
 
+       For example, on Debian the default usershare directory of
153
 
+       /var/lib/samba/usershares is set up as follows.
154
 
        </p><p>
155
 
        </p><pre class="programlisting">
156
 
-       ls -ld /usr/local/samba/lib/usershares/
157
 
-       drwxrwx--T  2 root power_users 4096 2006-05-05 12:27 /usr/local/samba/lib/usershares/
158
 
+       ls -ld /var/lib/samba/usershares/
159
 
+       drwxrwx--T  2 root sambashare 4096 2006-05-05 12:27 /var/lib/samba/usershares/
160
 
        </pre><p>
161
 
        </p><p>
162
 
-       In this case, only members of the group "power_users" can create user defined shares.
163
 
-       </p><p>Default: <span class="emphasis"><em><em class="parameter"><code>usershare path</code></em> = <code class="literal">NULL</code>
164
 
+       In this case, only members of the group "sambashare" can create user defined shares.
165
 
+       </p><p>Default: <span class="emphasis"><em><em class="parameter"><code>usershare path</code></em> = <code class="literal">/var/lib/samba/usershares</code>
166
 
 </em></span>
167
 
 </p></dd><dt><span class="term"><a name="USERSHAREPREFIXALLOWLIST"></a>usershare prefix allow list (G)</span></dt><dd><p>This parameter specifies a list of absolute pathnames
168
 
        the root of which are allowed to be exported by user defined share definitions.
169
 
Index: samba-3.0.28a/docs/htmldocs/manpages/net.8.html
170
 
===================================================================
171
 
--- samba-3.0.28a.orig/docs/htmldocs/manpages/net.8.html
172
 
+++ samba-3.0.28a/docs/htmldocs/manpages/net.8.html
173
 
@@ -249,30 +249,10 @@
174
 
 that use idmap_ldap as a backend. In this case the secret is used
175
 
 as the password for the user DN used to bind to the ldap server.
176
 
 </p></div><div class="refsect2" lang="en"><a name="id302073"></a><h3>USERSHARE</h3><p>Starting with version 3.0.23, a Samba server now supports the ability for
177
 
-non-root users to add user define shares to be exported using the "net usershare"
178
 
+non-root users to add user-defined shares to be exported using the "net usershare"
179
 
 commands.
180
 
 </p><p>
181
 
-To set this up, first set up your smb.conf by adding to the [global] section :
182
 
-
183
 
-usershare path = /usr/local/samba/lib/usershares
184
 
-
185
 
-Next create the directory /usr/local/samba/lib/usershares, change the owner to root and
186
 
-set the group owner to the UNIX group who should have the ability to create usershares,
187
 
-for example a group called "serverops".
188
 
-
189
 
-Set the permissions on /usr/local/samba/lib/usershares to 01770.
190
 
-
191
 
-(Owner and group all access, no access for others, plus the sticky bit,
192
 
-which means that a file in that directory can be renamed or deleted only
193
 
-by the owner of the file).
194
 
-
195
 
-Finally, tell smbd how many usershares you will allow by adding to the [global]
196
 
-section of smb.conf a line such as :
197
 
-
198
 
-usershare max shares = 100.
199
 
-
200
 
-To allow 100 usershare definitions. Now, members of the UNIX group "serverops"
201
 
-can create user defined shares on demand using the commands below.
202
 
+Members of the UNIX group "sambashare" can create user-defined shares on demand using the commands below.
203
 
 </p><p>The usershare commands are:
204
 
 
205
 
 </p><table class="simplelist" border="0" summary="Simple list"><tr><td>net usershare add sharename path [comment] [acl] [guest_ok=[y|n]] - to add or change a user defined share.</td></tr><tr><td>net usershare delete sharename - to delete a user defined share.</td></tr><tr><td>net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share.</td></tr><tr><td>net usershare list [-l|--long] [wildcard sharename] - to list user defined shares.</td></tr></table><p>