summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-03-10 08:43:32 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:11:14 -0500
commitc077d363a4f14afd2c83d57dcd52e6a2c1a2d42b (patch)
tree761da689f20bf820ff4a3972a608694ccb2c82f1 /source3/auth
parentd3d4e224785cae86b99cc748555aff9ac57de200 (diff)
downloadsamba-c077d363a4f14afd2c83d57dcd52e6a2c1a2d42b.tar.gz
samba-c077d363a4f14afd2c83d57dcd52e6a2c1a2d42b.tar.bz2
samba-c077d363a4f14afd2c83d57dcd52e6a2c1a2d42b.zip
r14130: Remove make_server_info_pac alltogether, make_server_info_info3 does
already do what we need. Guenther (This used to be commit 773e33c9717ae04f48983ddc49f7619a97523603)
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_util.c89
1 files changed, 0 insertions, 89 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 99ce6620c3..14aaa4c5ee 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -1088,95 +1088,6 @@ BOOL user_in_group(const char *username, const char *groupname)
/***************************************************************************
- Make (and fill) a user_info struct from a Kerberos PAC logon_info by
- conversion to a struct samu
-***************************************************************************/
-
-NTSTATUS make_server_info_pac(auth_serversupplied_info **server_info,
- char *unix_username,
- struct passwd *pwd,
- PAC_LOGON_INFO *logon_info)
-{
- NTSTATUS status;
- struct samu *sampass = NULL;
- DOM_SID user_sid, group_sid;
- fstring dom_name;
- auth_serversupplied_info *result;
- int i;
-
- if ( !(sampass = samu_new( NULL )) ) {
- return NT_STATUS_NO_MEMORY;
- }
-
- status = samu_set_unix( sampass, pwd );
- if ( !NT_STATUS_IS_OK(status) ) {
- return status;
- }
-
- result = make_server_info(NULL);
- if (result == NULL) {
- TALLOC_FREE(sampass);
- return NT_STATUS_NO_MEMORY;
- }
-
- /* only copy user_sid, group_sid and domain name out of the PAC for
- * now, we will benefit from more later - Guenther */
-
- sid_copy(&user_sid, &logon_info->info3.dom_sid.sid);
- sid_append_rid(&user_sid, logon_info->info3.user_rid);
- pdb_set_user_sid(sampass, &user_sid, PDB_SET);
-
- sid_copy(&group_sid, &logon_info->info3.dom_sid.sid);
- sid_append_rid(&group_sid, logon_info->info3.group_rid);
- pdb_set_group_sid(sampass, &group_sid, PDB_SET);
-
- unistr2_to_ascii(dom_name, &logon_info->info3.uni_logon_dom, -1);
- pdb_set_domain(sampass, dom_name, PDB_SET);
-
- pdb_set_logon_count(sampass, logon_info->info3.logon_count, PDB_SET);
-
- result->sam_account = sampass;
- result->unix_name = talloc_strdup(result, unix_username);
- result->uid = pwd->pw_uid;
- result->gid = pwd->pw_gid;
-
- result->sids = NULL;
- result->num_sids = 0;
-
- /* and create (by appending rids) the 'domain' sids */
-
- for (i = 0; i < logon_info->info3.num_groups2; i++) {
- DOM_SID sid;
- if (!sid_compose(&sid, &logon_info->info3.dom_sid.sid,
- logon_info->info3.gids[i].g_rid)) {
- DEBUG(3,("could not append additional group rid "
- "0x%x\n", logon_info->info3.gids[i].g_rid));
- TALLOC_FREE(result);
- return NT_STATUS_INVALID_PARAMETER;
- }
- add_sid_to_array(result, &sid, &result->sids,
- &result->num_sids);
- }
-
- /* Copy 'other' sids. We need to do sid filtering here to
- prevent possible elevation of privileges. See:
-
- http://www.microsoft.com/windows2000/techinfo/administration/security/sidfilter.asp
- */
-
- for (i = 0; i < logon_info->info3.num_other_sids; i++) {
- add_sid_to_array(result, &logon_info->info3.other_sids[i].sid,
- &result->sids,
- &result->num_sids);
- }
-
- *server_info = result;
-
- return NT_STATUS_OK;
-}
-
-
-/***************************************************************************
Make (and fill) a user_info struct from a 'struct passwd' by conversion
to a struct samu
***************************************************************************/