summaryrefslogtreecommitdiffstats
path: root/source3/auth/proto.h
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-02-11 11:50:37 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-04-05 06:32:07 +1000
commit17d8f0ad30847bb940f645ee1817d782ddaaee74 (patch)
tree1f1547798f45e3da1f0fecece628b4b07a95c0ff /source3/auth/proto.h
parent2ec48260ee377e499fe7f0fc2ca18b8a078c6aaa (diff)
downloadsamba-17d8f0ad30847bb940f645ee1817d782ddaaee74.tar.gz
samba-17d8f0ad30847bb940f645ee1817d782ddaaee74.tar.xz
samba-17d8f0ad30847bb940f645ee1817d782ddaaee74.zip
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
Diffstat (limited to 'source3/auth/proto.h')
-rw-r--r--source3/auth/proto.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/source3/auth/proto.h b/source3/auth/proto.h
index 3bf325e763..15e79dda0a 100644
--- a/source3/auth/proto.h
+++ b/source3/auth/proto.h
@@ -101,7 +101,10 @@ bool make_user_info_guest(struct auth_usersupplied_info **user_info) ;
struct samu;
NTSTATUS make_server_info_sam(struct auth_serversupplied_info **server_info,
struct samu *sampass);
-NTSTATUS create_local_token(struct auth_serversupplied_info *server_info);
+NTSTATUS create_local_token(TALLOC_CTX *mem_ctx,
+ struct auth_serversupplied_info *server_info,
+ DATA_BLOB *session_key,
+ struct auth_serversupplied_info **session_info_out);
NTSTATUS create_token_from_username(TALLOC_CTX *mem_ctx, const char *username,
bool is_guest,
uid_t *uid, gid_t *gid,
@@ -113,10 +116,10 @@ struct passwd;
NTSTATUS make_server_info_pw(struct auth_serversupplied_info **server_info,
char *unix_username,
struct passwd *pwd);
-NTSTATUS make_serverinfo_from_username(TALLOC_CTX *mem_ctx,
- const char *username,
- bool is_guest,
- struct auth_serversupplied_info **presult);
+NTSTATUS make_session_info_from_username(TALLOC_CTX *mem_ctx,
+ const char *username,
+ bool is_guest,
+ struct auth_serversupplied_info **session_info);
struct auth_serversupplied_info *copy_serverinfo(TALLOC_CTX *mem_ctx,
const struct auth_serversupplied_info *src);
bool init_guest_info(void);
@@ -258,11 +261,12 @@ NTSTATUS get_user_from_kerberos_info(TALLOC_CTX *mem_ctx,
char **ntdomain,
char **username,
struct passwd **_pw);
-NTSTATUS make_server_info_krb5(TALLOC_CTX *mem_ctx,
+NTSTATUS make_session_info_krb5(TALLOC_CTX *mem_ctx,
char *ntuser,
char *ntdomain,
char *username,
struct passwd *pw,
struct PAC_LOGON_INFO *logon_info,
- bool mapped_to_guest, bool username_was_mapped,
- struct auth_serversupplied_info **server_info);
+ bool mapped_to_guest, bool username_was_mapped,
+ DATA_BLOB *session_key,
+ struct auth_serversupplied_info **session_info);