diff options
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_rpc_samsync.c | 38 | ||||
-rw-r--r-- | source3/utils/pdbedit.c | 30 |
2 files changed, 34 insertions, 34 deletions
diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c index 00e5dee0ce..af778fcc0a 100644 --- a/source3/utils/net_rpc_samsync.c +++ b/source3/utils/net_rpc_samsync.c @@ -199,62 +199,62 @@ sam_account_from_delta(SAM_ACCOUNT *account, SAM_ACCOUNT_INFO *delta) desc, workstations, profile. */ unistr2_to_ascii(s, &delta->uni_acct_name, sizeof(s) - 1); - pdb_set_nt_username(account, s); + pdb_set_nt_username(account, s, PDB_CHANGED); /* Unix username is the same - for sainity */ - pdb_set_username(account, s); + pdb_set_username(account, s, PDB_CHANGED); unistr2_to_ascii(s, &delta->uni_full_name, sizeof(s) - 1); - pdb_set_fullname(account, s); + pdb_set_fullname(account, s, PDB_CHANGED); unistr2_to_ascii(s, &delta->uni_home_dir, sizeof(s) - 1); - pdb_set_homedir(account, s, True); + pdb_set_homedir(account, s, PDB_CHANGED); unistr2_to_ascii(s, &delta->uni_dir_drive, sizeof(s) - 1); - pdb_set_dir_drive(account, s, True); + pdb_set_dir_drive(account, s, PDB_CHANGED); unistr2_to_ascii(s, &delta->uni_logon_script, sizeof(s) - 1); - pdb_set_logon_script(account, s, True); + pdb_set_logon_script(account, s, PDB_CHANGED); unistr2_to_ascii(s, &delta->uni_acct_desc, sizeof(s) - 1); - pdb_set_acct_desc(account, s); + pdb_set_acct_desc(account, s, PDB_CHANGED); unistr2_to_ascii(s, &delta->uni_workstations, sizeof(s) - 1); - pdb_set_workstations(account, s); + pdb_set_workstations(account, s, PDB_CHANGED); unistr2_to_ascii(s, &delta->uni_profile, sizeof(s) - 1); - pdb_set_profile_path(account, s, True); + pdb_set_profile_path(account, s, PDB_CHANGED); /* User and group sid */ - pdb_set_user_sid_from_rid(account, delta->user_rid); - pdb_set_group_sid_from_rid(account, delta->group_rid); + pdb_set_user_sid_from_rid(account, delta->user_rid, PDB_CHANGED); + pdb_set_group_sid_from_rid(account, delta->group_rid, PDB_CHANGED); /* Logon and password information */ - pdb_set_logon_time(account, nt_time_to_unix(&delta->logon_time), True); + pdb_set_logon_time(account, nt_time_to_unix(&delta->logon_time), PDB_CHANGED); pdb_set_logoff_time(account, nt_time_to_unix(&delta->logoff_time), - True); - pdb_set_logon_divs(account, delta->logon_divs); + PDB_CHANGED); + pdb_set_logon_divs(account, delta->logon_divs, PDB_CHANGED); /* TODO: logon hours */ /* TODO: bad password count */ /* TODO: logon count */ pdb_set_pass_last_set_time( - account, nt_time_to_unix(&delta->pwd_last_set_time)); + account, nt_time_to_unix(&delta->pwd_last_set_time), PDB_CHANGED); - pdb_set_kickoff_time(account, get_time_t_max(), True); + pdb_set_kickoff_time(account, get_time_t_max(), PDB_CHANGED); /* Decode hashes from password hash */ sam_pwd_hash(delta->user_rid, delta->pass.buf_lm_pwd, lm_passwd, 0); sam_pwd_hash(delta->user_rid, delta->pass.buf_nt_pwd, nt_passwd, 0); - pdb_set_nt_passwd(account, nt_passwd); - pdb_set_lanman_passwd(account, lm_passwd); + pdb_set_nt_passwd(account, nt_passwd, PDB_CHANGED); + pdb_set_lanman_passwd(account, lm_passwd, PDB_CHANGED); /* TODO: account expiry time */ - pdb_set_acct_ctrl(account, delta->acb_info); + pdb_set_acct_ctrl(account, delta->acb_info, PDB_CHANGED); return NT_STATUS_OK; } diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c index 9508e6db7c..0151b6b153 100644 --- a/source3/utils/pdbedit.c +++ b/source3/utils/pdbedit.c @@ -247,15 +247,15 @@ static int set_user_info (struct pdb_context *in, char *username, char *fullname } if (fullname) - pdb_set_fullname(sam_pwent, fullname); + pdb_set_fullname(sam_pwent, fullname, PDB_CHANGED); if (homedir) - pdb_set_homedir(sam_pwent, homedir, True); + pdb_set_homedir(sam_pwent, homedir, PDB_CHANGED); if (drive) - pdb_set_dir_drive(sam_pwent,drive, True); + pdb_set_dir_drive(sam_pwent,drive, PDB_CHANGED); if (script) - pdb_set_logon_script(sam_pwent, script, True); + pdb_set_logon_script(sam_pwent, script, PDB_CHANGED); if (profile) - pdb_set_profile_path (sam_pwent, profile, True); + pdb_set_profile_path (sam_pwent, profile, PDB_CHANGED); if (NT_STATUS_IS_OK(in->pdb_update_sam_account (in, sam_pwent))) print_user_info (in, username, True, False); @@ -285,7 +285,7 @@ static int new_user (struct pdb_context *in, char *username, char *fullname, cha } else { fprintf (stderr, "WARNING: user %s does not exist in system passwd\n", username); pdb_init_sam(&sam_pwent); - if (!pdb_set_username(sam_pwent, username)) { + if (!pdb_set_username(sam_pwent, username, PDB_CHANGED)) { return False; } } @@ -313,17 +313,17 @@ static int new_user (struct pdb_context *in, char *username, char *fullname, cha SAFE_FREE(password2); if (fullname) - pdb_set_fullname(sam_pwent, fullname); + pdb_set_fullname(sam_pwent, fullname, PDB_CHANGED); if (homedir) - pdb_set_homedir (sam_pwent, homedir, True); + pdb_set_homedir (sam_pwent, homedir, PDB_CHANGED); if (drive) - pdb_set_dir_drive (sam_pwent, drive, True); + pdb_set_dir_drive (sam_pwent, drive, PDB_CHANGED); if (script) - pdb_set_logon_script(sam_pwent, script, True); + pdb_set_logon_script(sam_pwent, script, PDB_CHANGED); if (profile) - pdb_set_profile_path (sam_pwent, profile, True); + pdb_set_profile_path (sam_pwent, profile, PDB_CHANGED); - pdb_set_acct_ctrl (sam_pwent, ACB_NORMAL); + pdb_set_acct_ctrl (sam_pwent, ACB_NORMAL, PDB_CHANGED); if (NT_STATUS_IS_OK(in->pdb_add_sam_account (in, sam_pwent))) { print_user_info (in, username, True, False); @@ -361,11 +361,11 @@ static int new_machine (struct pdb_context *in, char *machinename) pdb_set_plaintext_passwd (sam_pwent, password); - pdb_set_username (sam_pwent, name); + pdb_set_username (sam_pwent, name, PDB_CHANGED); - pdb_set_acct_ctrl (sam_pwent, ACB_WSTRUST); + pdb_set_acct_ctrl (sam_pwent, ACB_WSTRUST, PDB_CHANGED); - pdb_set_group_sid_from_rid(sam_pwent, DOMAIN_GROUP_RID_COMPUTERS); + pdb_set_group_sid_from_rid(sam_pwent, DOMAIN_GROUP_RID_COMPUTERS, PDB_CHANGED); if (NT_STATUS_IS_OK(in->pdb_add_sam_account (in, sam_pwent))) { print_user_info (in, name, True, False); |