The Samba-Bugzilla – Attachment 634 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]
Patch smbmount as sugested on my last patch.
smbmount.c.patch (text/plain), 1.66 KB, created by
Haroldo Gamal
on 2004-09-01 13:07:45 UTC
(
hide
)
Description:
Patch smbmount as sugested on my last patch.
Filename:
MIME Type:
Creator:
Haroldo Gamal
Created:
2004-09-01 13:07:45 UTC
Size:
1.66 KB
patch
obsolete
>Index: client/smbmount.c >=================================================================== >--- client/smbmount.c (revision 2076) >+++ client/smbmount.c (working copy) >@@ -43,6 +43,10 @@ > static int smb_port = 0; > static BOOL got_user; > static BOOL got_pass; >+static BOOL use_uid = 0; >+static BOOL use_gid = 0; >+static BOOL use_fmask = 0; >+static BOOL use_dmask = 0; > static uid_t mount_uid; > static gid_t mount_gid; > static int mount_ro; >@@ -470,22 +474,22 @@ > if (mount_ro) { > args[i++] = "-r"; > } >- if (mount_uid) { >+ if (use_uid) { > slprintf(tmp, sizeof(tmp)-1, "%d", mount_uid); > args[i++] = "-u"; > args[i++] = smb_xstrdup(tmp); > } >- if (mount_gid) { >+ if (use_gid) { > slprintf(tmp, sizeof(tmp)-1, "%d", mount_gid); > args[i++] = "-g"; > args[i++] = smb_xstrdup(tmp); > } >- if (mount_fmask) { >+ if (use_fmask) { > slprintf(tmp, sizeof(tmp)-1, "0%o", mount_fmask); > args[i++] = "-f"; > args[i++] = smb_xstrdup(tmp); > } >- if (mount_dmask) { >+ if (use_dmask) { > slprintf(tmp, sizeof(tmp)-1, "0%o", mount_dmask); > args[i++] = "-d"; > args[i++] = smb_xstrdup(tmp); >@@ -783,14 +787,18 @@ > pstrcpy(my_netbios_name,opteq+1); > } else if(!strcmp(opts, "uid")) { > mount_uid = nametouid(opteq+1); >+ use_uid++; > } else if(!strcmp(opts, "gid")) { > mount_gid = nametogid(opteq+1); >+ use_gid++; > } else if(!strcmp(opts, "port")) { > smb_port = val; > } else if(!strcmp(opts, "fmask")) { > mount_fmask = strtol(opteq+1, NULL, 8); >+ use_fmask++; > } else if(!strcmp(opts, "dmask")) { > mount_dmask = strtol(opteq+1, NULL, 8); >+ use_dmask++; > } else if(!strcmp(opts, "debug")) { > DEBUGLEVEL = val; > } else if(!strcmp(opts, "ip")) {
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