[PATCH] mount.cifs: don't prompt for password on krb5 mounts

Jeff Layton jlayton at redhat.com
Mon Jul 28 12:56:37 GMT 2008


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 at redhat.com>
---

 source/client/mount.cifs.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c
index 72ef9fe..48d131c 100644
--- a/source/client/mount.cifs.c
+++ b/source/client/mount.cifs.c
@@ -473,7 +473,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) {



More information about the samba-technical mailing list