struct smb_passwd
{
- uint32 smb_userid; /* this is actually the unix uid_t */
+ uint32_t smb_userid; /* this is actually the unix uid_t */
const char *smb_name; /* username string */
const unsigned char *smb_passwd; /* Null if no password */
unsigned char smbpwd[16];
unsigned char smbntpwd[16];
- /* retrive-once info */
+ /* retrieve-once info */
const char *smbpasswd_file;
};
char linebuf[LINEBUF_SIZE + 1];
char readbuf[1024];
int c;
- fstring ascii_p16;
+ char ascii_p16[FSTRING_LEN + 20];
fstring encode_bits;
unsigned char *p = NULL;
size_t linebuf_len = 0;
#ifdef DEBUG_PASSWORD
DEBUG(100,("mod_smbfilepwd_entry: "));
- dump_data(100, (uint8 *)ascii_p16, wr_len);
+ dump_data(100, (uint8_t *)ascii_p16, wr_len);
#endif
if(wr_len > LINEBUF_SIZE) {
/* If the user specified a RID, make sure its able to be both stored and retreived */
if (rid == DOMAIN_RID_GUEST) {
- struct passwd *passwd = Get_Pwnam_alloc(NULL, lp_guestaccount());
+ struct passwd *passwd = Get_Pwnam_alloc(NULL, lp_guest_account());
if (!passwd) {
- DEBUG(0, ("Could not find guest account via Get_Pwnam_alloc()! (%s)\n", lp_guestaccount()));
+ DEBUG(0, ("Could not find guest account via Get_Pwnam_alloc()! (%s)\n", lp_guest_account()));
return False;
}
smb_pw->smb_userid=passwd->pw_uid;
/* More special case 'guest account' hacks... */
if (rid == DOMAIN_RID_GUEST) {
- const char *guest_account = lp_guestaccount();
+ const char *guest_account = lp_guest_account();
if (!(guest_account && *guest_account)) {
- DEBUG(1, ("Guest account not specfied!\n"));
+ DEBUG(1, ("Guest account not specified!\n"));
return nt_status;
}
return smbpasswd_getsampwnam(my_methods, sam_acct, guest_account);
TALLOC_CTX *ctx = talloc_tos();
NTSTATUS ret = NT_STATUS_UNSUCCESSFUL;
- if (!*(lp_renameuser_script(talloc_tos())))
+ if (!*(lp_rename_user_script(talloc_tos())))
goto done;
if ( !(new_acct = samu_new( NULL )) ) {
interim_account = True;
/* rename the posix user */
- rename_script = lp_renameuser_script(ctx);
+ rename_script = lp_rename_user_script(ctx);
if (!rename_script) {
ret = NT_STATUS_NO_MEMORY;
goto done;
goto done;
}
- rename_ret = smbrun(rename_script, NULL);
+ rename_ret = smbrun(rename_script, NULL, NULL);
DEBUG(rename_ret ? 0 : 3,("Running the command `%s' gave %d\n", rename_script, rename_ret));
return NT_STATUS_OK;
}
-NTSTATUS pdb_smbpasswd_init(void)
+NTSTATUS pdb_smbpasswd_init(TALLOC_CTX *ctx)
{
return smb_register_passdb(PASSDB_INTERFACE_VERSION, "smbpasswd", pdb_init_smbpasswd);
}