diff options
author | Jeff Layton <jlayton@samba.org> | 2013-03-22 06:43:46 -0400 |
---|---|---|
committer | Jeff Layton <jlayton@samba.org> | 2013-03-22 06:44:27 -0400 |
commit | 8ef14ea81773310a439a70e419f33dcc1c76f1eb (patch) | |
tree | a112b4ca7d0929f9682cc727967cb07d8c572091 | |
parent | fa6c3ca6e032ff6cb0caba97b46bfc1cffc401b5 (diff) | |
download | cifs-utils-8ef14ea81773310a439a70e419f33dcc1c76f1eb.tar.gz cifs-utils-8ef14ea81773310a439a70e419f33dcc1c76f1eb.tar.bz2 cifs-utils-8ef14ea81773310a439a70e419f33dcc1c76f1eb.zip |
mount.cifs: remove support for "NFS syntax"
...as promised for version 6.0.
Cc: Scott Lovenberg <scott.lovenberg@gmail.com>
Signed-off-by: Jeff Layton <jlayton@samba.org>
-rw-r--r-- | mount.cifs.c | 38 |
1 files changed, 10 insertions, 28 deletions
diff --git a/mount.cifs.c b/mount.cifs.c index 40b77e9..496a2c8 100644 --- a/mount.cifs.c +++ b/mount.cifs.c @@ -1232,36 +1232,18 @@ static int parse_unc(const char *unc_name, struct parsed_mount_info *parsed_info return EX_USAGE; } - /* Set up "host" and "share" pointers based on UNC format. */ - /* TODO: Remove support for NFS syntax as of cifs-utils-6.0. */ if (strncmp(unc_name, "//", 2) && strncmp(unc_name, "\\\\", 2)) { - /* - * check for nfs syntax (server:/share/prepath) - * - * FIXME: IPv6 addresses? - */ - host = unc_name; - share = strchr(host, ':'); - if (!share) { - fprintf(stderr, "mount.cifs: bad UNC (%s)\n", unc_name); - return EX_USAGE; - } - hostlen = share - host; - share++; - if (*share == '/') - ++share; - fprintf(stderr, "WARNING: using NFS syntax for mounting CIFS " - "shares is deprecated and will be removed in cifs-utils" - "-6.0. Please migrate to UNC syntax.\n"); - } else { - host = unc_name + 2; - hostlen = strcspn(host, "/\\"); - if (!hostlen) { - fprintf(stderr, "mount.cifs: bad UNC (%s)\n", unc_name); - return EX_USAGE; - } - share = host + hostlen + 1; + fprintf(stderr, "mount.cifs: bad UNC (%s)\n", unc_name); + return EX_USAGE; + } + + host = unc_name + 2; + hostlen = strcspn(host, "/\\"); + if (!hostlen) { + fprintf(stderr, "mount.cifs: bad UNC (%s)\n", unc_name); + return EX_USAGE; } + share = host + hostlen + 1; if (hostlen + 1 > sizeof(parsed_info->host)) { fprintf(stderr, "mount.cifs: host portion of UNC too long\n"); |