summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2001-12-27 06:38:04 +0000
committerGerald Carter <jerry@samba.org>2001-12-27 06:38:04 +0000
commit04aff47c716a51a1039b44a81d6ff19eeaa09017 (patch)
treee2fc04ef3089c003baa711d55cd89310b824d44b /source3/rpc_server
parentb6bbc39204a4676922099ab78b6c48009266d1bb (diff)
downloadsamba-04aff47c716a51a1039b44a81d6ff19eeaa09017.tar.gz
samba-04aff47c716a51a1039b44a81d6ff19eeaa09017.tar.bz2
samba-04aff47c716a51a1039b44a81d6ff19eeaa09017.zip
moving SAM_ACCOUNT to include a bit field for initialized
members (such as uid and gid). This way we will be able to keep ourselves from writing out default smb.conf settings when the admin doesn't want to, That part is not done yet. Tested compiles with ldap/tdb/smbpasswd. Tested connection with smbpasswd backend. oh...and smbpasswd doesn'y automatically expire accounts after 21 days from the last password change either now. Just ifdef'd out that code in build_sam_account(). Will merge updates into 2.2 as they are necessary. jerry (This used to be commit f0d43791157d8f04a13a07d029f203ad4384d317)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_pipe.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 4b3140b350..c97619c4b6 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -274,8 +274,8 @@ static BOOL api_pipe_ntlmssp_verify(pipes_struct *p, RPC_AUTH_NTLMSSP_RESP *ntlm
auth_authsupplied_info *auth_info = NULL;
auth_serversupplied_info *server_info = NULL;
- uid_t *puid;
- uid_t *pgid;
+ uid_t uid;
+ uid_t gid;
DEBUG(5,("api_pipe_ntlmssp_verify: checking user details\n"));
@@ -417,17 +417,17 @@ failed authentication on named pipe %s.\n", domain, user_name, wks, p->name ));
* Store the UNIX credential data (uid/gid pair) in the pipe structure.
*/
- puid = pdb_get_uid(server_info->sam_account);
- pgid = pdb_get_gid(server_info->sam_account);
-
- if (!puid || !pgid) {
+ if (!IS_SAM_UNIX_USER(server_info->sam_account)) {
DEBUG(0,("Attempted authenticated pipe with invalid user. No uid/gid in SAM_ACCOUNT\n"));
free_server_info(&server_info);
return False;
}
- p->pipe_user.uid = *puid;
- p->pipe_user.gid = *pgid;
+ uid = pdb_get_uid(server_info->sam_account);
+ gid = pdb_get_gid(server_info->sam_account);
+
+ p->pipe_user.uid = uid;
+ p->pipe_user.gid = gid;
/* Set up pipe user group membership. */
initialise_groups(p->pipe_user_name, p->pipe_user.uid, p->pipe_user.gid);