[SCM] s3-auth use create_local_token()

Andreas Schneider asn at samba.org
Tue Apr 5 02:41:04 MDT 2011


On Monday 04 April 2011 23:51:01 Andrew Bartlett wrote:
> commit 17d8f0ad30847bb940f645ee1817d782ddaaee74
> Author: Andrew Bartlett <abartlet at samba.org>
> Date:   Fri Feb 11 11:50:37 2011 +1100
> 
>     s3-auth use create_local_token() to transform server_info ->
> session_info
> 
>     Before a auth_serversupplied_info struct can be used for
>     authorization, the local groups and privileges must be calculated.
>     create_local_token() now copies the server_info, and then sets the
>     calulated token and unix groups.
> 
>     Soon, it will also transform the result into an expanded struct
>     auth_session_info.  Until then, the variable name (server_info vs
>     session_info provides a clue to the developer about what information
>     has been entered in the structure).
> 
>     By moving the calls to create_local_token within the codebase, we
>     remove duplication, and ensure that the session key (where modified)
>     is consistently copied into the new structure.
> 
>     Andrew Bartlett
> 
> -----------------------------------------------------------------------

Hi Andrew,

> -NTSTATUS create_local_token(struct auth_serversupplied_info *server_info)
> +NTSTATUS create_local_token(TALLOC_CTX *mem_ctx,
> +			    struct auth_serversupplied_info *server_info,

shoudn't this be const? :)

> +			    DATA_BLOB *session_key,
> +			    struct auth_serversupplied_info 
**session_info_out)
>  {
>  	NTSTATUS status;
>  	size_t i;
>  	struct dom_sid tmp_sid;


	-- andreas

-- 
Andreas Schneider                   GPG-ID: F33E3FC6
Samba Team                             asn at samba.org
www.samba.org



More information about the samba-technical mailing list