librpc/idl Add helper structures for use by samba3 in auth_session_info
authorAndrew Bartlett <abartlet@samba.org>
Fri, 11 Feb 2011 07:47:21 +0000 (18:47 +1100)
committerStefan Metzmacher <metze@samba.org>
Tue, 22 Feb 2011 18:32:54 +0000 (19:32 +0100)
The unix info and in particular unix token needs to be preserved into
the struct auth_session_info.

Andrew Bartlett

librpc/idl/auth.idl
librpc/idl/security.idl

index 6b2cb56eeafe24208a9b804f1c3d9f1d300a485a..7b4556a6d7293bd2c9c9e9947e6e0a3a8a48f61f 100644 (file)
@@ -51,6 +51,19 @@ interface auth
                PAC_SIGNATURE_DATA *pac_kdc_sig;
        } auth_user_info_torture;
 
+       typedef [public] struct {
+               utf8string unix_name;
+
+               /*
+                * For performance reasons we keep an alpha_strcpy-sanitized version
+                * of the username around as long as the global variable current_user
+                * still exists. If we did not do keep this, we'd have to call
+                * alpha_strcpy whenever we do a become_user(), potentially on every
+                * smb request. See set_current_user_info in source3.
+                */
+               utf8string sanitized_username;
+       } auth_user_info_unix;
+
        /* This is the interim product of the auth subsystem, before
         * privileges and local groups are handled */
        typedef [public] struct {
@@ -63,7 +76,9 @@ interface auth
 
        typedef [public] struct {
                security_token *security_token;
+               security_unix_token *unix_token;
                auth_user_info *info;
+               auth_user_info_unix *unix_info;
                DATA_BLOB session_key;
                DATA_BLOB exported_gssapi_credentials;
        } auth_session_info_transport;
index 266af49caa6921124ebd590ecda2fdb0a9e57352..2f633ab0eff7e872e63081ab50ad4b70948f796c 100644 (file)
@@ -577,6 +577,14 @@ interface security
                lsa_SystemAccessModeFlags rights_mask;
        } security_token;
 
+       /* This is not yet sent over the network, but is simply defined in IDL */
+       typedef [public] struct {
+               uid_t uid;
+               uid_t gid;
+               uint32 ngroups;
+               [size_is(ngroups)] gid_t groups[*];
+       } security_unix_token;
+
        /* bits that determine which parts of a security descriptor
           are being queried/set */
        typedef [public,bitmap32bit] bitmap {