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

Steve Langasek vorlon at debian.org
Mon Jul 28 17:17:26 GMT 2008


On Mon, Jul 28, 2008 at 01:11:36PM -0400, Jeff Layton wrote:
> > > 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) {

> > I think you probably also want 'krb5i' here, then?

> I'm using strncmp() with a size of 4. That should cover any string
> that starts with "krb5", won't it?

Er, yes it should - sorry, read it too quickly :-)

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org


More information about the samba-technical mailing list