[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-2086-gd1e5a5a

Günther Deschner gd at samba.org
Tue Feb 12 08:50:40 GMT 2008


The branch, v3-2-test has been updated
       via  d1e5a5a7f9dfb5756398e99cf09a4712d2b42682 (commit)
      from  ef7c74401c71a238944cb1a9bbd448a4693339bf (commit)

http://gitweb.samba.org/?samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit d1e5a5a7f9dfb5756398e99cf09a4712d2b42682
Author: Günther Deschner <gd at samba.org>
Date:   Tue Feb 12 00:07:41 2008 +0100

    Removing unused ACCT_-flags.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source/include/passdb.h       |   33 +++------------------------------
 source/libnet/libnet_join.c   |    3 ++-
 source/rpc_parse/parse_samr.c |    2 +-
 source/utils/net_domain.c     |    3 ++-
 source/utils/net_rpc.c        |   10 +++++-----
 5 files changed, 13 insertions(+), 38 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/include/passdb.h b/source/include/passdb.h
index b72ec6b..8d5934d 100644
--- a/source/include/passdb.h
+++ b/source/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/source/libnet/libnet_join.c b/source/libnet/libnet_join.c
index 6d9cc1f..e6fcc76 100644
--- a/source/libnet/libnet_join.c
+++ b/source/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/source/rpc_parse/parse_samr.c b/source/rpc_parse/parse_samr.c
index 3ab3dd5..5a76be7 100644
--- a/source/rpc_parse/parse_samr.c
+++ b/source/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/source/utils/net_domain.c b/source/utils/net_domain.c
index 8bd2378..c545fd9 100644
--- a/source/utils/net_domain.c
+++ b/source/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/source/utils/net_rpc.c b/source/utils/net_rpc.c
index 71ed74e..46b66bb 100644
--- a/source/utils/net_rpc.c
+++ b/source/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;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list