summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorJean-François Micouleau <jfm@samba.org>2000-09-28 17:35:03 +0000
committerJean-François Micouleau <jfm@samba.org>2000-09-28 17:35:03 +0000
commitb06d83c909e0587accf93e090c62395ff8b1bb87 (patch)
tree673a6627b0bbf870ff1377a4da0b58081387e9c5 /source3/passdb
parent1ef79dbcabbe58c1338040eaea9fbcfe3b7ea105 (diff)
downloadsamba-b06d83c909e0587accf93e090c62395ff8b1bb87.tar.gz
samba-b06d83c909e0587accf93e090c62395ff8b1bb87.tar.bz2
samba-b06d83c909e0587accf93e090c62395ff8b1bb87.zip
fixed samr_create_user(). we now correctly parse the query and the reply.
And we create the disabled account. That means we can create user and trust accounts remotely ! ifdef out a return in passdb/smbpass.c. I think I didn't break any security. Jeremy could you check if I didn't make any mistakes ??? J.F. (This used to be commit 416be1b64f366c8b859f25856fce2467ec0446d9)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/smbpass.c6
-rw-r--r--source3/passdb/smbpasschange.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/source3/passdb/smbpass.c b/source3/passdb/smbpass.c
index ec1a984b76..45935db99e 100644
--- a/source3/passdb/smbpass.c
+++ b/source3/passdb/smbpass.c
@@ -329,7 +329,13 @@ static struct smb_passwd *getsmbfilepwent(void *vp)
pw_buf.smb_nt_passwd = NULL;
pw_buf.smb_passwd = NULL;
pw_buf.acct_ctrl |= ACB_DISABLED;
+
+#if 0 /* JFM */
+ /* commented to continue in the case of a trust account disabled */
+ /* samr_create_user() is adding disabled accounts */
+
return &pw_buf;
+#endif
}
if (linebuf_len < (PTR_DIFF(p, linebuf) + 33)) {
diff --git a/source3/passdb/smbpasschange.c b/source3/passdb/smbpasschange.c
index 2c971fbff9..0c30bbe4a5 100644
--- a/source3/passdb/smbpasschange.c
+++ b/source3/passdb/smbpasschange.c
@@ -41,7 +41,9 @@ static BOOL add_new_user(char *user_name, uid_t uid, int local_flags,
if(local_flags & LOCAL_DISABLE_USER) {
new_smb_pwent.acct_ctrl |= ACB_DISABLED;
- } else if (local_flags & LOCAL_SET_NO_PASSWORD) {
+ }
+
+ if (local_flags & LOCAL_SET_NO_PASSWORD) {
new_smb_pwent.acct_ctrl |= ACB_PWNOTREQ;
} else {
new_smb_pwent.smb_passwd = new_p16;