mount.cifs: don't prompt for password on krb5 mounts
authorJeff Layton <jlayton@redhat.com>
Fri, 12 Sep 2008 20:58:00 +0000 (16:58 -0400)
committerJeff Layton <jlayton@redhat.com>
Fri, 12 Sep 2008 20:58:00 +0000 (16:58 -0400)
krb5 mounts require that the user already have a valid krb5 ticket.
Since we can't currently use the password entered, don't prompt for it.

Also, switch to using strncmp instead of strcmp here.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
source/client/mount.cifs.c

index 5ac96232113853aebd733b7143ffce0be1c16c2c..722715319a9b8530399a09084fa70e34e9f2b584 100644 (file)
@@ -477,7 +477,8 @@ static int parse_options(char ** optionsp, int * filesys_flags)
                        }
                } else if (strncmp(data, "sec", 3) == 0) {
                        if (value) {
-                               if (!strcmp(value, "none"))
+                               if (!strncmp(value, "none", 4) ||
+                                   !strncmp(value, "krb5", 4))
                                        got_password = 1;
                        }
                } else if (strncmp(data, "ip", 2) == 0) {