PATCH: Support binding to local IP in mount.cifs (only)
Ben Greear
greearb at candelatech.com
Tue Aug 1 17:14:34 GMT 2006
Since it seems that the SMB code is deprecated, here is a patch
that adds the local IP binding logic to mount.cifs. A kernel patch to
enable the feature in the cifs file system will follow.
Please apply and/or give feedback if changes are needed.
Thanks,
Ben
diff -Naur -X samba_excludes --recursive samba-3.0.23/source/client/mount.cifs.c samba-3.0.23.ben/source/client/mount.cifs.c
--- samba-3.0.23/source/client/mount.cifs.c 2006-06-23 06:16:53.000000000 -0700
+++ samba-3.0.23.ben/source/client/mount.cifs.c 2006-07-20 17:14:10.000000000 -0700
@@ -95,6 +95,7 @@
printf(" to a local directory.\n\nOptions:\n");
printf("\tuser=<arg>\n\tpass=<arg>\n\tdom=<arg>\n");
printf("\nLess commonly used options:");
+ printf("\n\tlocal_ip=<a.b.c.d>,");
printf("\n\tcredentials=<filename>,guest,perm,noperm,setuids,nosetuids,rw,ro,");
printf("\n\tsep=<char>,iocharset=<codepage>,suid,nosuid,exec,noexec,serverino,");
printf("\n\tdirectio,mapchars,nomapchars,nolock,servernetbiosname=<SRV_RFC1001NAME>");
@@ -467,6 +468,11 @@
printf("domain name too long\n");
return 1;
}
+ } else if (strncmp(data, "local_ip", 8) == 0) {
+ if (!value || !*value) {
+ printf("CIFS: invalid local_ip\n");
+ return 1; /* needs_arg; */
+ }
} else if (strncmp(data, "cred", 4) == 0) {
if (value && *value) {
rc = open_cred_file(value);
--
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc http://www.candelatech.com
More information about the samba-technical
mailing list