diff options
author | Steve French <sfrench@samba.org> | 2003-08-29 07:31:39 +0000 |
---|---|---|
committer | Steve French <sfrench@samba.org> | 2003-08-29 07:31:39 +0000 |
commit | 78e75d4f6c6bab84b4f40c5d86398c7c90b8ae36 (patch) | |
tree | 81f16f25549fb4d588e8d9d9e69940cab879e58a /source3 | |
parent | 939c35e38480892b6fe22420db771cb16daba7ad (diff) | |
download | samba-78e75d4f6c6bab84b4f40c5d86398c7c90b8ae36.tar.gz samba-78e75d4f6c6bab84b4f40c5d86398c7c90b8ae36.tar.bz2 samba-78e75d4f6c6bab84b4f40c5d86398c7c90b8ae36.zip |
Update mount helper to take synonyms for file_mode and dir_mode (fmask and dmask)
(This used to be commit 89a0e97094fa85b6339f0ad0884cf55987758263)
Diffstat (limited to 'source3')
-rwxr-xr-x | source3/client/mount.cifs.c | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/source3/client/mount.cifs.c b/source3/client/mount.cifs.c index 6bd8c0f008..7ab17a2b02 100755 --- a/source3/client/mount.cifs.c +++ b/source3/client/mount.cifs.c @@ -164,17 +164,36 @@ int parse_options(char * options) if (value && *value) { got_gid = 1; } - } /* else if (strnicmp(data, "file_mode", 4) == 0) { - if (value && *value) { - vol->file_mode = - simple_strtoul(value, &value, 0); + /* fmask and dmask synonyms for people used to smbfs syntax */ + } else if (strcmp(data, "file_mode") == 0 || strcmp(data, "fmask")==0) { + if (!value || !*value) { + printf ("Option '%s' requires a numerical argument\n", data); + return 1; } - } else if (strnicmp(data, "dir_mode", 3) == 0) { - if (value && *value) { - vol->dir_mode = - simple_strtoul(value, &value, 0); + + if (value[0] != '0') { + printf ("WARNING: '%s' not expressed in octal.\n", data); } - } else if (strnicmp(data, "port", 4) == 0) { + + if (strcmp (data, "fmask") == 0) { + printf ("WARNING: CIFS mount option 'fmask' is deprecated. Use 'file_mode' instead.\n"); + data = "file_mode"; + } + } else if (strcmp(data, "dir_mode") == 0 || strcmp(data, "dmask")==0) { + if (!value || !*value) { + printf ("Option '%s' requires a numerical argument\n", data); + return 1; + } + + if (value[0] != '0') { + printf ("WARNING: '%s' not expressed in octal.\n", data); + } + + if (strcmp (data, "dmask") == 0) { + printf ("WARNING: CIFS mount option 'dmask' is deprecated. Use 'dir_mode' instead.\n"); + data = "dir_mode"; + } + } /* else if (strnicmp(data, "port", 4) == 0) { if (value && *value) { vol->port = simple_strtoul(value, &value, 0); |