mount.cifs: treat uid=,gid=,cruid= options as name before assuming they're a number
authorJeff Layton <jlayton@samba.org>
Mon, 19 Nov 2012 01:38:38 +0000 (20:38 -0500)
committerJeff Layton <jlayton@samba.org>
Mon, 3 Dec 2012 14:58:57 +0000 (09:58 -0500)
commit8b6e0cc242fc62436b0dd073e393bbdd62f39a83
tree1a124ca3bc7557f9fb38b5deb30a4b772492da67
parent92e12ecc28ac1a41eb48f693837be0ba070dc8af
mount.cifs: treat uid=,gid=,cruid= options as name before assuming they're a number

Sergio Conrad reported a problem trying to set up an autofs map to do
a krb5 mount. In his environment, many users have usernames that are
comprised entirely of numbers. While that's a bit odd, POSIX apparently
allows for it.

The current code assumes that when a numeric argument is passed to one
of the above options, that it's a uid or gid. Instead, try to treat the
argument as a user or group name first, and only try to treat it as a
number if that fails.

Signed-off-by: Jeff Layton <jlayton@samba.org>
mount.cifs.c