s3-auth Remove seperate guest boolean
[mat/samba.git] / source3 / rpc_server / lsa / srv_lsa_nt.c
index 8aea353679e37f9363f7e25ae7162a644c206a33..5877c7b295cb4587bc94ef7b757b21436deb071e 100644 (file)
@@ -2400,7 +2400,7 @@ NTSTATUS _lsa_GetUserName(struct pipes_struct *p,
                return NT_STATUS_INVALID_PARAMETER;
        }
 
-       if (p->session_info->unix_info->guest) {
+       if (security_session_user_level(p->session_info, NULL) < SECURITY_USER) {
                /*
                 * I'm 99% sure this is not the right place to do this,
                 * global_sid_Anonymous should probably be put into the token