[Pkg-samba-maint] r1747 - in trunk/samba/debian: . patches
bubulle at alioth.debian.org
bubulle at alioth.debian.org
Sun Mar 9 09:04:55 UTC 2008
Author: bubulle
Date: 2008-03-09 09:04:55 +0000 (Sun, 09 Mar 2008)
New Revision: 1747
Removed:
trunk/samba/debian/patches/linux-cifs-user-perms.patch
Modified:
trunk/samba/debian/changelog
trunk/samba/debian/patches/series
Log:
linux-cifs-user-perms.patch was applied upstream
Modified: trunk/samba/debian/changelog
===================================================================
--- trunk/samba/debian/changelog 2008-03-09 08:43:25 UTC (rev 1746)
+++ trunk/samba/debian/changelog 2008-03-09 09:04:55 UTC (rev 1747)
@@ -5,6 +5,7 @@
interfaces can be located. Closes: #433449
* Debian patches dropped as applied upstream:
- make-distclean.patch
+ - linux-cifs-user-perms.patch
-- Christian Perrier <bubulle at debian.org> Sun, 09 Mar 2008 08:57:28 +0100
Deleted: trunk/samba/debian/patches/linux-cifs-user-perms.patch
===================================================================
--- trunk/samba/debian/patches/linux-cifs-user-perms.patch 2008-03-09 08:43:25 UTC (rev 1746)
+++ trunk/samba/debian/patches/linux-cifs-user-perms.patch 2008-03-09 09:04:55 UTC (rev 1747)
@@ -1,112 +0,0 @@
-Goal: when mount.cifs is called by a non-root user, provide default uid= and
-gid= options matching the current process
-
-Upstream status: submitted as bugzilla bug #4780. Applied for 3.0.28a
-
-Index: samba-3.0.25c/source/client/mount.cifs.c
-===================================================================
---- samba-3.0.25c.orig/source/client/mount.cifs.c 2007-08-26 12:07:14.598393722 +0200
-+++ samba-3.0.25c/source/client/mount.cifs.c 2007-08-26 13:09:08.419408730 +0200
-@@ -321,6 +321,8 @@
- int out_len = 0;
- int word_len;
- int rc = 0;
-+ char user[32];
-+ char group[32];
-
- if (!optionsp || !*optionsp)
- return 1;
-@@ -331,6 +333,13 @@
-
- /* BB fixme check for separator override BB */
-
-+ if (getuid()) {
-+ got_uid = 1;
-+ sprintf(user,"%u",getuid());
-+ got_gid = 1;
-+ sprintf(group,"%u",getgid());
-+ }
-+
- /* while ((data = strsep(&options, ",")) != NULL) { */
- while(data != NULL) {
- /* check if ends with trailing comma */
-@@ -493,33 +502,35 @@
- got_uid = 1;
- if (!isdigit(*value)) {
- struct passwd *pw;
-- static char temp[32];
-
- if (!(pw = getpwnam(value))) {
- printf("bad user name \"%s\"\n", value);
- exit(1);
- }
-- sprintf(temp, "%u", pw->pw_uid);
-- value = temp;
-+ sprintf(user, "%u", pw->pw_uid);
- endpwent();
-+ } else {
-+ strcpy(user,value);
- }
- }
-+ goto nocopy;
- } else if (strncmp(data, "gid", 3) == 0) {
- if (value && *value) {
- got_gid = 1;
- if (!isdigit(*value)) {
- struct group *gr;
-- static char temp[32];
-
- if (!(gr = getgrnam(value))) {
- printf("bad group name \"%s\"\n", value);
- exit(1);
- }
-- sprintf(temp, "%u", gr->gr_gid);
-- value = temp;
-+ sprintf(group, "%u", gr->gr_gid);
- endpwent();
-+ } else {
-+ strcpy(group,value);
- }
- }
-+ goto nocopy;
- /* fmask and dmask synonyms for people used to smbfs syntax */
- } else if (strcmp(data, "file_mode") == 0 || strcmp(data, "fmask")==0) {
- if (!value || !*value) {
-@@ -621,6 +632,37 @@
- nocopy:
- data = next_keyword;
- }
-+
-+ // special-case the uid and gid
-+ if (got_uid) {
-+ word_len = strlen(user);
-+
-+ out = (char *)realloc(out, out_len + word_len + 6);
-+ if (out == NULL) {
-+ perror("malloc");
-+ exit(1);
-+ }
-+
-+ if (out_len)
-+ out[out_len++] = ',';
-+ sprintf(out + out_len, "uid=%s", user);
-+ out_len = strlen(out);
-+ }
-+ if (got_gid) {
-+ word_len = strlen(group);
-+
-+ out = (char *)realloc(out, out_len + word_len + 6);
-+ if (out == NULL) {
-+ perror("malloc");
-+ exit(1);
-+ }
-+
-+ if (out_len)
-+ out[out_len++] = ',';
-+ sprintf(out + out_len, "gid=%s", group);
-+ out_len = strlen(out);
-+ }
-+
- free(*optionsp);
- *optionsp = out;
- return 0;
Modified: trunk/samba/debian/patches/series
===================================================================
--- trunk/samba/debian/patches/series 2008-03-09 08:43:25 UTC (rev 1746)
+++ trunk/samba/debian/patches/series 2008-03-09 09:04:55 UTC (rev 1747)
@@ -12,7 +12,6 @@
VERSION.patch
adapt_machine_creation_script.patch
autoconf.patch
-linux-cifs-user-perms.patch
cifs-umount-same-user.patch
smbpasswd-syslog.patch
get_global_sam_sid-non-root.patch
More information about the Pkg-samba-maint
mailing list