diff options
Diffstat (limited to 'source/smbd/uid.c')
-rw-r--r-- | source/smbd/uid.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/smbd/uid.c b/source/smbd/uid.c index bf9e294808e..8eb34e24063 100644 --- a/source/smbd/uid.c +++ b/source/smbd/uid.c @@ -187,6 +187,11 @@ BOOL become_user(connection_struct *conn, uint16 vuid) gid_t gid; uid_t uid; + if (!conn) { + DEBUG(2,("Connection not open\n")); + return(False); + } + /* * We need a separate check in security=share mode due to vuid * always being UID_FIELD_INVALID. If we don't do this then @@ -207,11 +212,6 @@ BOOL become_user(connection_struct *conn, uint16 vuid) unbecome_user(); - if (!conn) { - DEBUG(2,("Connection not open\n")); - return(False); - } - snum = SNUM(conn); if((vuser != NULL) && !check_user_ok(conn, vuser, snum)) |