summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/passdb.h33
-rw-r--r--source3/libnet/libnet_join.c3
-rw-r--r--source3/rpc_parse/parse_samr.c2
-rw-r--r--source3/utils/net_domain.c3
-rw-r--r--source3/utils/net_rpc.c10
5 files changed, 13 insertions, 38 deletions
diff --git a/source3/include/passdb.h b/source3/include/passdb.h
index b72ec6b0ba..8d5934df52 100644
--- a/source3/include/passdb.h
+++ b/source3/include/passdb.h
@@ -25,40 +25,13 @@
/*
- * fields_present flags meanings
- * same names as found in samba4 idl files
+ * in samba4 idl
+ * ACCT_NT_PWD_SET == SAMR_FIELD_PASSWORD and
+ * ACCT_LM_PWD_SET == SAMR_FIELD_PASSWORD2
*/
-#define ACCT_USERNAME 0x00000001
-#define ACCT_FULL_NAME 0x00000002
-#define ACCT_RID 0x00000004
-#define ACCT_PRIMARY_GID 0x00000008
-#define ACCT_DESCRIPTION 0x00000010
-#define ACCT_COMMENT 0x00000020
-#define ACCT_HOME_DIR 0x00000040
-#define ACCT_HOME_DRIVE 0x00000080
-#define ACCT_LOGON_SCRIPT 0x00000100
-#define ACCT_PROFILE 0x00000200
-#define ACCT_WORKSTATIONS 0x00000400
-#define ACCT_LAST_LOGON 0x00000800
-#define ACCT_LAST_LOGOFF 0x00001000
-#define ACCT_LOGON_HOURS 0x00002000
-#define ACCT_BAD_PWD_COUNT 0x00004000
-#define ACCT_NUM_LOGONS 0x00008000
-#define ACCT_ALLOW_PWD_CHANGE 0x00010000
-#define ACCT_FORCE_PWD_CHANGE 0x00020000
-#define ACCT_LAST_PWD_CHANGE 0x00040000
-#define ACCT_EXPIRY 0x00080000
-#define ACCT_FLAGS 0x00100000
-#define ACCT_CALLBACK 0x00200000
-#define ACCT_COUNTRY_CODE 0x00400000
-#define ACCT_CODE_PAGE 0x00800000
#define ACCT_NT_PWD_SET 0x01000000
#define ACCT_LM_PWD_SET 0x02000000
-#define ACCT_PRIVATEDATA 0x04000000
-#define ACCT_EXPIRED_FLAG 0x08000000
-#define ACCT_SEC_DESC 0x10000000
-#define ACCT_OWF_PWD 0x20000000
/*
* bit flags representing initialized fields in struct samu
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 6d9cc1fbc4..e6fcc76d6c 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -776,7 +776,8 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx,
ZERO_STRUCT(ctr);
ZERO_STRUCT(p25);
- fields_present = ACCT_NT_PWD_SET | ACCT_LM_PWD_SET | ACCT_FLAGS;
+ fields_present = ACCT_NT_PWD_SET | ACCT_LM_PWD_SET |
+ SAMR_FIELD_ACCT_FLAGS;
init_sam_user_info25P(&p25, fields_present, acb_info, (char *)pwbuf);
ctr.switch_value = infolevel;
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index 3ab3dd5c58..5a76be70ac 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/rpc_parse/parse_samr.c
@@ -1732,7 +1732,7 @@ void init_sam_user_info23A(SAM_USER_INFO_23 * usr, NTTIME * logon_time, /* all z
/*************************************************************************
init_samr_user_info25P
- fields_present = ACCT_NT_PWD_SET | ACCT_LM_PWD_SET | ACCT_FLAGS
+ fields_present = ACCT_NT_PWD_SET | ACCT_LM_PWD_SET | SAMR_FIELD_ACCT_FLAGS
*************************************************************************/
void init_sam_user_info25P(SAM_USER_INFO_25 * usr,
diff --git a/source3/utils/net_domain.c b/source3/utils/net_domain.c
index 8bd23782d4..c545fd9160 100644
--- a/source3/utils/net_domain.c
+++ b/source3/utils/net_domain.c
@@ -371,7 +371,8 @@ NTSTATUS netdom_join_domain( TALLOC_CTX *mem_ctx, struct cli_state *cli,
ZERO_STRUCT(ctr);
ZERO_STRUCT(p25);
- fields_present = ACCT_NT_PWD_SET | ACCT_LM_PWD_SET | ACCT_FLAGS;
+ fields_present = ACCT_NT_PWD_SET | ACCT_LM_PWD_SET |
+ SAMR_FIELD_ACCT_FLAGS;
init_sam_user_info25P(&p25, fields_present, acb_info, (char *)pwbuf);
ctr.switch_value = infolevel;
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 71ed74edcc..46b66bbd36 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -1547,7 +1547,7 @@ do { if (strequal(ctx->thiscmd, name)) { \
do { if (strequal(ctx->thiscmd, name)) { \
init_unistr2(&usr->uni_##rec, argv[0], UNI_STR_TERMINATE); \
init_uni_hdr(&usr->hdr_##rec, &usr->uni_##rec); \
- usr->fields_present |= ACCT_##flag; } \
+ usr->fields_present |= SAMR_FIELD_##flag; } \
} while (0);
static NTSTATUS rpc_sh_user_str_edit_internals(TALLOC_CTX *mem_ctx,
@@ -1597,10 +1597,10 @@ static NTSTATUS rpc_sh_user_str_edit_internals(TALLOC_CTX *mem_ctx,
}
SETSTR("fullname", full_name, FULL_NAME);
- SETSTR("homedir", home_dir, HOME_DIR);
+ SETSTR("homedir", home_dir, HOME_DIRECTORY);
SETSTR("homedrive", dir_drive, HOME_DRIVE);
SETSTR("logonscript", logon_script, LOGON_SCRIPT);
- SETSTR("profilepath", profile_path, PROFILE);
+ SETSTR("profilepath", profile_path, PROFILE_PATH);
SETSTR("description", acct_desc, DESCRIPTION);
result = rpccli_samr_set_userinfo2(
@@ -1682,7 +1682,7 @@ static NTSTATUS rpc_sh_user_flag_edit_internals(TALLOC_CTX *mem_ctx,
ZERO_STRUCTP(usr);
usr->acb_info = newflags;
- usr->fields_present = ACCT_FLAGS;
+ usr->fields_present = SAMR_FIELD_ACCT_FLAGS;
result = rpccli_samr_set_userinfo2(
pipe_hnd, mem_ctx, user_hnd, 21,
@@ -5680,7 +5680,7 @@ static NTSTATUS rpc_trustdom_add_internals(const DOM_SID *domain_sid,
&notime, &notime, &notime,
nostr, nostr, nostr, nostr, nostr,
nostr, nostr, nostr, nostr, nostr,
- 0, 0, acb_info, ACCT_FLAGS, 168, &hrs,
+ 0, 0, acb_info, SAMR_FIELD_ACCT_FLAGS, 168, &hrs,
0, 0, (char *)pwbuf);
ctr.switch_value = 23;
ctr.info.id23 = &p23;