* responsible.
*/
-extern pstring global_myname;
-
/************************************************************
Fill the SAM_ACCOUNT with default values.
***********************************************************/
{
ZERO_STRUCT(user->private); /* Don't touch the talloc context */
+ /* no initial methods */
+ user->methods = NULL;
+
/* Don't change these timestamp settings without a good reason.
They are important for NT member server compatibility. */
TALLOC_CTX *mem_ctx;
NTSTATUS nt_status;
- mem_ctx = talloc_init_named("passdb internal SAM_ACCOUNT allocation");
+ mem_ctx = talloc_init("passdb internal SAM_ACCOUNT allocation");
if (!mem_ctx) {
DEBUG(0,("pdb_init_sam: error while doing talloc_init()\n"));
pdb_set_profile_path(sam_account,
talloc_sub_specified((sam_account)->mem_ctx,
lp_logon_path(),
- pwd->pw_name, global_myname,
+ pwd->pw_name, global_myname(),
pwd->pw_uid, pwd->pw_gid),
PDB_DEFAULT);
pdb_set_homedir(sam_account,
talloc_sub_specified((sam_account)->mem_ctx,
lp_logon_home(),
- pwd->pw_name, global_myname,
+ pwd->pw_name, global_myname(),
pwd->pw_uid, pwd->pw_gid),
PDB_DEFAULT);
pdb_set_dir_drive(sam_account,
talloc_sub_specified((sam_account)->mem_ctx,
lp_logon_drive(),
- pwd->pw_name, global_myname,
+ pwd->pw_name, global_myname(),
pwd->pw_uid, pwd->pw_gid),
PDB_DEFAULT);
pdb_set_logon_script(sam_account,
talloc_sub_specified((sam_account)->mem_ctx,
lp_logon_script(),
- pwd->pw_name, global_myname,
+ pwd->pw_name, global_myname(),
pwd->pw_uid, pwd->pw_gid),
PDB_DEFAULT);
if (!pdb_set_acct_ctrl(sam_account, ACB_NORMAL, PDB_DEFAULT)) {
/**
* Free the contets of the SAM_ACCOUNT, but not the structure.
*
- * Also wipes the LM and NT hashes and plaintext passwrod from
+ * Also wipes the LM and NT hashes and plaintext password from
* memory.
*
* @param user SAM_ACCOUNT to free members of.
{
int i;
unsigned char lonybble, hinybble;
- char *hexchars = "0123456789ABCDEF";
+ const char *hexchars = "0123456789ABCDEF";
char *p1, *p2;
if (!p)
DEBUG(5,("local_lookup_sid: looking up RID %u.\n", (unsigned int)rid));
if (rid == DOMAIN_USER_RID_ADMIN) {
- char **admin_list = lp_admin_users(-1);
+ const char **admin_list = lp_admin_users(-1);
*psid_name_use = SID_NAME_USER;
if (admin_list) {
- char *p = *admin_list;
+ const char *p = *admin_list;
if(!next_token(&p, name, NULL, sizeof(fstring)))
fstrcpy(name, "Administrator");
} else {