On Wed, Jan 19, 2011 at 11:11:01PM +0100, Andreas Schneider wrote: > > commit 7a97518e12054e1f84236501322b756c5c09d7dd > Author: Andreas Schneider <a...@samba.org> > Date: Wed Jan 19 16:22:28 2011 +0100 > > s3-smbd: Fixed a possible null pointer dereference. > > index dd6af6d..b573a6c 100644 > --- a/source3/smbd/uid.c > +++ b/source3/smbd/uid.c > @@ -229,7 +229,7 @@ void conn_clear_vuid_cache(connection_struct *conn, > uint16_t vuid) > bool change_to_user(connection_struct *conn, uint16 vuid) > { > const struct auth_serversupplied_info *server_info = NULL; > - user_struct *vuser = get_valid_user_struct(conn->sconn, vuid); > + user_struct *vuser; > int snum; > gid_t gid; > uid_t uid; > @@ -242,6 +242,8 @@ bool change_to_user(connection_struct *conn, uint16 vuid) > return(False); > } > > + vuser = get_valid_user_struct(conn->sconn, vuid); > + > /* > * We need a separate check in security=share mode due to vuid > * always being UID_FIELD_INVALID. If we don't do this then
Andreas, can you please explain this commit *exactly*. How does leaving vuser undefined fix this ? Jeremy.