Re: [PATCH 1/6] mount.cifs: treat uid=,gid=,cruid= options as name before assuming they're a number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 4, 2012 at 10:16 AM, Jeff Layton <jlayton@xxxxxxxxx> wrote:
> 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@xxxxxxxxx>

Yuck.  What happens when a number is both a valid user name and uid?
IE, I add a user named "0" (uid=5001).  Does getpwnam() return root
(uid=0) or 0 (uid=5001)?

-- 
Peace and Blessings,
-Scott.
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux