The Samba-Bugzilla – Attachment 628 Details for
Bug 999
smbmount unable to use uid and gid options with kernel 2.6
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Complements the kernel patch sent before.
smbmnt.c.patch (text/plain), 1.99 KB, created by
Haroldo Gamal
on 2004-08-31 15:52:50 UTC
(
hide
)
Description:
Complements the kernel patch sent before.
Filename:
MIME Type:
Creator:
Haroldo Gamal
Created:
2004-08-31 15:52:50 UTC
Size:
1.99 KB
patch
obsolete
>Index: client/smbmnt.c >=================================================================== >--- client/smbmnt.c (revision 2076) >+++ client/smbmnt.c (working copy) >@@ -32,6 +32,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_fmode = 0; >+static int opt_dmode = 0; > > static void > help(void) >@@ -64,11 +68,13 @@ > case 'u': > if (!user_mount) { > mount_uid = strtol(optarg, NULL, 0); >+ opt_uid++; > } > break; > case 'g': > if (!user_mount) { > mount_gid = strtol(optarg, NULL, 0); >+ opt_gid++; > } > break; > case 'r': >@@ -76,9 +82,11 @@ > break; > case 'f': > mount_fmask = strtol(optarg, NULL, 8); >+ opt_fmode++; > break; > case 'd': > mount_dmask = strtol(optarg, NULL, 8); >+ opt_dmode++; > break; > case 'o': > options = optarg; >@@ -160,9 +168,17 @@ > data2 = (char *) data; > } > >- slprintf(opts, sizeof(opts)-1, >- "version=7,uid=%d,gid=%d,file_mode=0%o,dir_mode=0%o,%s", >- data->uid, data->gid, data->file_mode, data->dir_mode,options); >+ slprintf(opts, sizeof(opts)-1, "version=7,"); >+ if (opt_uid) >+ slprintf(opts+strlen(opts), sizeof(opts)-strlen(opts)-1, "uid=%d,", data->uid); >+ if (opt_gid) >+ slprintf(opts+strlen(opts), sizeof(opts)-strlen(opts)-1, "gid=%d,", data->gid); >+ if (opt_fmode) >+ slprintf(opts+strlen(opts), sizeof(opts)-strlen(opts)-1, "file_mode=%d,", data->file_mode); >+ 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); >@@ -303,4 +319,6 @@ > } > > return 0; >-} >+} >+ >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 999
:
621
|
626
| 628 |
634
|
635
|
2801