proposed new Unix QFS Info level

Steve French smfrench at
Tue Feb 6 20:21:31 GMT 2007

To address the problem of determining what Unix uid represents this
authenticated user,
the following new QFS Info level has been proposed (in the Unix/POSIX QFS
Info range).   This level
takes implicit input of the authenticated smb user (what user/password you
specified on session setup)
which can be known based on the supplied
   smb_uid, tid, and tcp socket
in the smb header of the (empty) QFSInfo level 0x202 request

The proposed response (see below) includes the unix uid, and one or more
gids which the server
os associates with this user (and corresponding SIDs if the server supports

Unix/POSIX "whoami" proposed format:

typedef struct whoami_rsp_data { /* Query FS Info level 0x202 */
        __u32 flags; /* 0 = Authenticated user 1 = GUEST */
        __u32 mask /* which flags bits server understands ie 0x0001 */
        __u64 unix_user_id;
        __u64 unix_user_gid;
        __u32 number_of_supplementary_gids; /* may be zero */
        __u32 number_of_sids; /* may be zero */
        __u32 length_of_sid_array; /* in bytes - may be zero */
        __u32 pad; /* reserved - MBZ */
        /* __u64 gid_array[0];  /* may be empty */
        /* __u8 * psid_list */  /* may be empty */




More information about the samba-technical mailing list