summaryrefslogtreecommitdiff
path: root/source3/passdb/pdb_smbpasswd.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-05-18 09:32:59 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-05-18 09:32:59 +0000
commit55ec09ad95d40fdb8a05388d8f94afec28d44a3b (patch)
treed5dada4b7ff92686d53b2b13f092f21b591f8cf0 /source3/passdb/pdb_smbpasswd.c
parentd4dac178df1ff7dba83e3adddb55770b0b26e530 (diff)
downloadsamba-55ec09ad95d40fdb8a05388d8f94afec28d44a3b.tar.gz
samba-55ec09ad95d40fdb8a05388d8f94afec28d44a3b.tar.bz2
samba-55ec09ad95d40fdb8a05388d8f94afec28d44a3b.zip
Remove const from some functions to match the changed prototype in a
previous commit, and remove some unsued variables. Main change: Make sure to fill in the username when making a non-unix account from smbpasswd. (This used to be commit 7019486eacb72ca44c42ce620b8696bb29f12292)
Diffstat (limited to 'source3/passdb/pdb_smbpasswd.c')
-rw-r--r--source3/passdb/pdb_smbpasswd.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c
index f7ab6f3070..e2050627e1 100644
--- a/source3/passdb/pdb_smbpasswd.c
+++ b/source3/passdb/pdb_smbpasswd.c
@@ -1248,7 +1248,8 @@ static BOOL build_sam_account(struct smbpasswd_privates *smbpasswd_state,
a general default for non-unix users. --abartlet 2002-01-08
*/
pdb_set_group_rid (sam_pass, DOMAIN_GROUP_RID_USERS);
-
+ pdb_set_username (sam_pass, pw_buf->smb_name);
+ pdb_set_domain (sam_pass, lp_workgroup());
} else {
pwfile = getpwnam_alloc(pw_buf->smb_name);
@@ -1367,9 +1368,6 @@ static BOOL smbpasswd_getsampwnam(struct pdb_methods *my_methods, SAM_ACCOUNT *s
struct smbpasswd_privates *smbpasswd_state = (struct smbpasswd_privates*)my_methods->private_data;
struct smb_passwd *smb_pw;
void *fp = NULL;
- char *domain = NULL;
- char *user = NULL;
- fstring name;
DEBUG(10, ("getsampwnam (smbpasswd): search by name: %s\n", username));
@@ -1456,7 +1454,7 @@ static BOOL smbpasswd_getsampwrid(struct pdb_methods *my_methods, SAM_ACCOUNT *s
return True;
}
-static BOOL smbpasswd_add_sam_account(struct pdb_methods *my_methods, const SAM_ACCOUNT *sampass)
+static BOOL smbpasswd_add_sam_account(struct pdb_methods *my_methods, SAM_ACCOUNT *sampass)
{
struct smbpasswd_privates *smbpasswd_state = (struct smbpasswd_privates*)my_methods->private_data;
struct smb_passwd smb_pw;
@@ -1474,7 +1472,7 @@ static BOOL smbpasswd_add_sam_account(struct pdb_methods *my_methods, const SAM_
return True;
}
-static BOOL smbpasswd_update_sam_account(struct pdb_methods *my_methods, const SAM_ACCOUNT *sampass)
+static BOOL smbpasswd_update_sam_account(struct pdb_methods *my_methods, SAM_ACCOUNT *sampass)
{
struct smbpasswd_privates *smbpasswd_state = (struct smbpasswd_privates*)my_methods->private_data;
struct smb_passwd smb_pw;
@@ -1494,7 +1492,7 @@ static BOOL smbpasswd_update_sam_account(struct pdb_methods *my_methods, const S
return True;
}
-static BOOL smbpasswd_delete_sam_account (struct pdb_methods *my_methods, const SAM_ACCOUNT *sampass)
+static BOOL smbpasswd_delete_sam_account (struct pdb_methods *my_methods, SAM_ACCOUNT *sampass)
{
struct smbpasswd_privates *smbpasswd_state = (struct smbpasswd_privates*)my_methods->private_data;