[Pkg-samba-maint] r1474 - in trunk/samba/debian: . patches

vorlon at alioth.debian.org vorlon at alioth.debian.org
Mon Jul 9 04:54:42 UTC 2007


Author: vorlon
Date: 2007-07-09 04:54:41 +0000 (Mon, 09 Jul 2007)
New Revision: 1474

Modified:
   trunk/samba/debian/changelog
   trunk/samba/debian/patches/missing_userspace_bugzilla999.patch
Log:
Always use opt_gid and opt_uid, set to those of the invoking user, when
called as non-root.  Closes: #431661.



Modified: trunk/samba/debian/changelog
===================================================================
--- trunk/samba/debian/changelog	2007-06-27 19:19:43 UTC (rev 1473)
+++ trunk/samba/debian/changelog	2007-07-09 04:54:41 UTC (rev 1474)
@@ -2,6 +2,9 @@
 
   * Don't start nmbd if 'disable netbios' is set in the config.
     Closes: #429429.
+  * missing_userspace_bugzilla999.patch: always use opt_gid and opt_uid,
+    set to those of the invoking user, when called as non-root.
+    Closes: #431661.
 
  -- Steve Langasek <vorlon at debian.org>  Wed, 27 Jun 2007 12:12:40 -0700
 

Modified: trunk/samba/debian/patches/missing_userspace_bugzilla999.patch
===================================================================
--- trunk/samba/debian/patches/missing_userspace_bugzilla999.patch	2007-06-27 19:19:43 UTC (rev 1473)
+++ trunk/samba/debian/patches/missing_userspace_bugzilla999.patch	2007-07-09 04:54:41 UTC (rev 1474)
@@ -12,16 +12,16 @@
 
 Index: samba-3.0.25b/source/client/smbmnt.c
 ===================================================================
---- samba-3.0.25b.orig/source/client/smbmnt.c	2007-06-27 09:28:37.735603237 +0200
-+++ samba-3.0.25b/source/client/smbmnt.c	2007-06-27 09:29:03.234391955 +0200
+--- samba-3.0.25b.orig/source/client/smbmnt.c	2007-07-08 17:50:36.000000000 -0700
++++ samba-3.0.25b/source/client/smbmnt.c	2007-07-08 17:56:51.000000000 -0700
 @@ -49,6 +49,10 @@
  static unsigned mount_dmask;
  static int user_mount;
  static char *options;
 +static int opt_uid = 0;
-+static int opt_gid = 0; 
++static int opt_gid = 0;
 +static int opt_fmode = 0;
-+static int opt_dmode = 0; 
++static int opt_dmode = 0;
  
  static void
  help(void)
@@ -59,23 +59,32 @@
 -		 "version=7,uid=%d,gid=%d,file_mode=0%o,dir_mode=0%o,%s",
 -		 mount_uid, mount_gid, data->file_mode, data->dir_mode,options);
 +	slprintf(opts, sizeof(opts)-1, "version=7,");
-+	if (opt_uid) 
++	if (opt_uid)
 +		slprintf(opts+strlen(opts), sizeof(opts)-strlen(opts)-1, "uid=%d,", mount_uid);
-+	if (opt_gid) 
++	if (opt_gid)
 +		slprintf(opts+strlen(opts), sizeof(opts)-strlen(opts)-1, "gid=%d,", mount_gid);
-+	if (opt_fmode) 
++	if (opt_fmode)
 +		slprintf(opts+strlen(opts), sizeof(opts)-strlen(opts)-1, "file_mode=%d,", data->file_mode);
-+	if (opt_dmode) 
++	if (opt_dmode)
 +		slprintf(opts+strlen(opts), sizeof(opts)-strlen(opts)-1, "dir_mode=%d,", data->dir_mode);
 +	slprintf(opts+strlen(opts), sizeof(opts)-strlen(opts)-1, "%s",options);
 +
  	if (mount(share_name, ".", "smbfs", flags, data1) == 0)
  		return 0;
  	return mount(share_name, ".", "smbfs", flags, data2);
+@@ -213,6 +229,8 @@
+ 
+ 	if (getuid() != 0) {
+ 		user_mount = 1;
++		opt_uid++;
++		opt_gid++;
+ 	}
+ 
+         if (geteuid() != 0) {
 Index: samba-3.0.25b/source/client/smbmount.c
 ===================================================================
---- samba-3.0.25b.orig/source/client/smbmount.c	2007-06-27 09:28:37.735603237 +0200
-+++ samba-3.0.25b/source/client/smbmount.c	2007-06-27 09:29:03.234391955 +0200
+--- samba-3.0.25b.orig/source/client/smbmount.c	2007-07-08 17:50:36.000000000 -0700
++++ samba-3.0.25b/source/client/smbmount.c	2007-07-08 17:50:36.000000000 -0700
 @@ -43,6 +43,10 @@
  static int smb_port = 0;
  static BOOL got_user;




More information about the Pkg-samba-maint mailing list