diff options
author | Jeff Layton <jlayton@samba.org> | 2010-07-26 13:00:44 -0400 |
---|---|---|
committer | Jeff Layton <jlayton@samba.org> | 2010-07-26 13:00:44 -0400 |
commit | d1c43959212e335f7f46a7f53d6d8d8b734a7743 (patch) | |
tree | e04f6ec99632aa47006da953e2f9f34d71ed2414 | |
parent | a8eb879c080c0273d9272dac5ff41bd8a4b3440e (diff) | |
download | cifs-utils-d1c43959212e335f7f46a7f53d6d8d8b734a7743.tar.gz cifs-utils-d1c43959212e335f7f46a7f53d6d8d8b734a7743.tar.bz2 cifs-utils-d1c43959212e335f7f46a7f53d6d8d8b734a7743.zip |
cifs.upcall: require a uid= or creduid= parm
Even though all known kernels send the uid= parm to userspace,
cifs.upcall doesn't technically require it. It should though. If one
wasn't sent for some reason, then the setuid wouldn't occur. Error out
if there is no uid= or creduid= parm.
Signed-off-by: Jeff Layton <jlayton@samba.org>
-rw-r--r-- | cifs.upcall.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cifs.upcall.c b/cifs.upcall.c index 1f4341d..8f7850a 100644 --- a/cifs.upcall.c +++ b/cifs.upcall.c @@ -707,6 +707,11 @@ int main(const int argc, char *const argv[]) goto out; } ccname = find_krb5_cc(CIFS_DEFAULT_KRB5_DIR, arg.uid); + } else { + /* no uid= or creduid= parm -- something is wrong */ + syslog(LOG_ERR, "No uid= or creduid= parm specified"); + rc = 1; + goto out; } host = arg.hostname; |