From: Jeff Layton Subject: Re: [PATCH] cifs.upcall: require a uid= or creduid= parm Date: Tue, 27 Jul 2010 12:42:00 -0400 Message-ID: <20100727124200.094e80ca@tlielax.poochiereds.net> References: <1280163930-983-1-git-send-email-jlayton@samba.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Jeff Layton Return-path: In-Reply-To: <1280163930-983-1-git-send-email-jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org> Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: On Mon, 26 Jul 2010 13:05:28 -0400 Jeff Layton wrote: > 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 > --- > 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; merged -- Jeff Layton