mount.cifs: remove support for "NFS syntax"
authorJeff Layton <jlayton@samba.org>
Fri, 22 Mar 2013 10:43:46 +0000 (06:43 -0400)
committerJeff Layton <jlayton@samba.org>
Fri, 22 Mar 2013 10:44:27 +0000 (06:44 -0400)
...as promised for version 6.0.

Cc: Scott Lovenberg <scott.lovenberg@gmail.com>
Signed-off-by: Jeff Layton <jlayton@samba.org>
mount.cifs.c

index 40b77e92e3f734c606f522ccf279a0508ad64eab..496a2c81306d568999c00f220ea4c23c3396f945 100644 (file)
@@ -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");