summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2003-05-18 09:06:09 +0000
committerSimo Sorce <idra@samba.org>2003-05-18 09:06:09 +0000
commita670285dedfaa07707518a778fb87bcd6fadcc48 (patch)
treef0b1b71eefb553860db1c366882425c534ec5f53 /source3
parent79338d85cd08433b439e79d53c6b3abdb725be62 (diff)
downloadsamba-a670285dedfaa07707518a778fb87bcd6fadcc48.tar.gz
samba-a670285dedfaa07707518a778fb87bcd6fadcc48.tar.bz2
samba-a670285dedfaa07707518a778fb87bcd6fadcc48.zip
port fixes from 3.0
(This used to be commit 0d098df8b5db02c73b859aea136d01c9ca42b17a)
Diffstat (limited to 'source3')
-rw-r--r--source3/passdb/passdb.c10
-rw-r--r--source3/passdb/pdb_guest.c2
-rw-r--r--source3/passdb/pdb_smbpasswd.c2
3 files changed, 4 insertions, 10 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index 1add2bfa7f..f34513b225 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());
diff --git a/source3/passdb/pdb_guest.c b/source3/passdb/pdb_guest.c
index f5cd3d996d..359e2285a3 100644
--- a/source3/passdb/pdb_guest.c
+++ b/source3/passdb/pdb_guest.c
@@ -54,7 +54,7 @@ static NTSTATUS guestsam_getsampwnam (struct pdb_methods *methods, SAM_ACCOUNT *
if (!pdb_set_fullname(sam_account, guest_account, PDB_SET))
return NT_STATUS_UNSUCCESSFUL;
- if (!pdb_set_domain(sam_account, lp_workgroup(), PDB_DEFAULT))
+ if (!pdb_set_domain(sam_account, get_global_sam_name(), PDB_DEFAULT))
return NT_STATUS_UNSUCCESSFUL;
if (!pdb_set_acct_ctrl(sam_account, ACB_NORMAL, PDB_DEFAULT))
diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c
index 91fc7bc8e0..c9e66a4715 100644
--- a/source3/passdb/pdb_smbpasswd.c
+++ b/source3/passdb/pdb_smbpasswd.c
@@ -1210,7 +1210,7 @@ static BOOL build_sam_account(struct smbpasswd_privates *smbpasswd_state,
*/
pdb_set_group_sid_from_rid (sam_pass, DOMAIN_GROUP_RID_USERS, PDB_SET);
pdb_set_username (sam_pass, pw_buf->smb_name, PDB_SET);
- pdb_set_domain (sam_pass, lp_workgroup(), PDB_DEFAULT);
+ pdb_set_domain (sam_pass, get_global_sam_name(), PDB_DEFAULT);
} else {
DEBUG(0,("build_sam_account: smbpasswd database is corrupt! username %s with uid %u is not in unix passwd database!\n", pw_buf->smb_name, pw_buf->smb_userid));