Changeset 740 for vendor/current/source3/utils/pdbedit.c
- Timestamp:
- Nov 14, 2012, 12:59:34 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/utils/pdbedit.c
r414 r740 22 22 23 23 #include "includes.h" 24 #include "popt_common.h" 25 #include "../librpc/gen_ndr/samr.h" 26 #include "../libcli/security/security.h" 27 #include "passdb.h" 24 28 25 29 #define BIT_BACKEND 0x00000004 … … 56 60 #define MASK_USER_GOOD 0x60405FE0 57 61 58 static int get_sid_from_cli_string( DOM_SID*sid, const char *str_sid)62 static int get_sid_from_cli_string(struct dom_sid *sid, const char *str_sid) 59 63 { 60 64 uint32_t rid; … … 69 73 return -1; 70 74 } 71 sid_copy(sid, get_global_sam_sid()); 72 sid_append_rid(sid, rid); 75 sid_compose(sid, get_global_sam_sid(), rid); 73 76 } 74 77 … … 105 108 struct samu *user; 106 109 struct samu *account; 107 DOM_SIDuser_sid;110 struct dom_sid user_sid; 108 111 109 112 DEBUG(4, ("Processing account %s\n", userentry.account_name)); … … 203 206 204 207 for (i=1; decode_account_policy_name(i) != NULL; i++) { 205 uint32 policy_value;208 uint32_t policy_value; 206 209 if (!account_policy_get_default(i, &policy_value)) { 207 210 fprintf(stderr, "Can't get default account policy\n"); … … 227 230 228 231 for ( i=1; decode_account_policy_name(i) != NULL; i++ ) { 229 uint32 policy_value;232 uint32_t policy_value; 230 233 NTSTATUS status; 231 234 … … 263 266 if (verbosity) { 264 267 char temp[44]; 265 const uint8 *hours;268 const uint8_t *hours; 266 269 267 270 printf ("Unix username: %s\n", pdb_get_username(sam_pwent)); … … 330 333 nt_passwd, 331 334 pdb_encode_acct_ctrl(pdb_get_acct_ctrl(sam_pwent),NEW_PW_FORMAT_SPACE_PADDED_LEN), 332 (uint32)convert_time_t_to_uint32 (pdb_get_pass_last_set_time(sam_pwent)));335 (uint32)convert_time_t_to_uint32_t(pdb_get_pass_last_set_time(sam_pwent))); 333 336 } else { 334 337 uid = nametouid(pdb_get_username(sam_pwent)); … … 378 381 struct samu *sam_pwent; 379 382 TALLOC_CTX *tosctx; 380 DOM_SIDuser_sid;383 struct dom_sid user_sid; 381 384 bool bret; 382 385 int ret; … … 436 439 struct samu *sam_pwent; 437 440 TALLOC_CTX *tosctx; 438 DOM_SIDuser_sid;441 struct dom_sid user_sid; 439 442 NTSTATUS status; 440 443 bool bret; … … 506 509 uint32_t not_settable; 507 510 uint32_t new_flags; 508 DOM_SIDu_sid;511 struct dom_sid u_sid; 509 512 bool ret; 510 513 … … 525 528 memset(hours_array, 0xff, hours_len); 526 529 527 pdb_set_hours(sam_pwent, hours_array, PDB_CHANGED);530 pdb_set_hours(sam_pwent, hours_array, hours_len, PDB_CHANGED); 528 531 } 529 532 … … 594 597 } 595 598 596 value = convert_uint32_t o_time_t(num);599 value = convert_uint32_t_to_time_t(num); 597 600 } 598 601 … … 620 623 uint32_t not_settable; 621 624 uint32_t new_flags; 622 DOM_SIDm_sid;625 struct dom_sid m_sid; 623 626 char *name; 624 627 int len; … … 711 714 TALLOC_CTX *tosctx; 712 715 NTSTATUS status; 713 DOM_SIDu_sid;716 struct dom_sid u_sid; 714 717 int flags; 715 718 int ret; … … 808 811 TALLOC_CTX *tosctx; 809 812 NTSTATUS status; 810 DOM_SIDm_sid;813 struct dom_sid m_sid; 811 814 char *compatpwd; 812 815 char *name; … … 1057 1060 load_case_tables(); 1058 1061 1059 setup_logging("pdbedit", True);1062 setup_logging("pdbedit", DEBUG_STDOUT); 1060 1063 1061 1064 pc = poptGetContext(NULL, argc, (const char **) argv, long_options, … … 1134 1137 /* account policy operations */ 1135 1138 if ((checkparms & BIT_ACCPOLICY) && !(checkparms & ~(BIT_ACCPOLICY + BIT_ACCPOLVAL))) { 1136 uint32 value;1139 uint32_t value; 1137 1140 enum pdb_policy_type field = account_policy_name_to_typenum(account_policy); 1138 1141 if (field == 0) {
Note:
See TracChangeset
for help on using the changeset viewer.