summaryrefslogtreecommitdiff
path: root/source3/passdb/passdb.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-05-13 15:29:23 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-05-13 15:29:23 +0000
commitb47963ae5a90ac54c021c9dd6528079180174cc4 (patch)
tree952aff10309777715b1386f922f7146d53b80f7b /source3/passdb/passdb.c
parentd9029797fec576c517747c9adbda0d0bafdc3975 (diff)
downloadsamba-b47963ae5a90ac54c021c9dd6528079180174cc4.tar.gz
samba-b47963ae5a90ac54c021c9dd6528079180174cc4.tar.bz2
samba-b47963ae5a90ac54c021c9dd6528079180174cc4.zip
Restore a number of fixes that idra removed when he merged his
idmap-and-the-rest from HEAD. These are correctness fixes that were already in 3.0, and a memory leak fix. The pdb_ldap changes are held back at jerry's request (he is also playing with pdb_ldap ATM). Andrew Bartlett (This used to be commit c7d5e336bd91514a02974044742b058be387e490)
Diffstat (limited to 'source3/passdb/passdb.c')
-rw-r--r--source3/passdb/passdb.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index d3554cdbde..d262b09520 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -35,12 +35,6 @@ const char *get_global_sam_name(void)
return global_myname();
}
-/*
- * This is set on startup - it defines the SID for this
- * machine, and therefore the SAM database for which it is
- * responsible.
- */
-
/************************************************************
Fill the SAM_ACCOUNT with default values.
***********************************************************/
@@ -183,7 +177,7 @@ NTSTATUS pdb_fill_sam_pw(SAM_ACCOUNT *sam_account, const struct passwd *pwd)
pdb_set_unix_homedir(sam_account, pwd->pw_dir, PDB_SET);
- pdb_set_domain (sam_account, lp_workgroup(), PDB_DEFAULT);
+ pdb_set_domain (sam_account, get_global_sam_name(), PDB_DEFAULT);
/* When we get a proper uid -> SID and SID -> uid allocation
mechinism, we should call it here.
@@ -299,7 +293,7 @@ NTSTATUS pdb_init_sam_new(SAM_ACCOUNT **new_sam_acct, const char *username)
return nt_status;
}
- pdb_set_domain (*new_sam_acct, lp_workgroup(), PDB_DEFAULT);
+ pdb_set_domain (*new_sam_acct, get_global_sam_name(), PDB_DEFAULT);
/* set Domain Users by default ! */
sid_copy(&g_sid, get_global_sam_sid());