return NT_STATUS_UNSUCCESSFUL;
}
- if (!pdb_init_sam(&sampass)) {
- return NT_STATUS_NO_MEMORY;
+ /* Can't use the talloc version here, becouse the returned struct gets
+ kept on the server_info */
+ if (!NT_STATUS_IS_OK(nt_status = pdb_init_sam(&sampass))) {
+ return nt_status;
}
/* get the account information */
BOOL make_server_info_pw(auth_serversupplied_info **server_info, const struct passwd *pwd)
{
SAM_ACCOUNT *sampass = NULL;
- if (!pdb_init_sam_pw(&sampass, pwd)) {
+ if (!NT_STATUS_IS_OK(pdb_init_sam_pw(&sampass, pwd))) {
return False;
}
return make_server_info_sam(server_info, sampass);
memset(user->private.hours, 0xff, user->private.hours_len); /* available at all hours */
user->private.unknown_5 = 0x00000000; /* don't know */
user->private.unknown_6 = 0x000004ec; /* don't know */
+
+ /* Some parts of samba strlen their pdb_get...() returns,
+ so this keeps the interface unchanged for now. */
+
+ user->private.username = "";
+ user->private.domain = "";
+ user->private.nt_username = "";
+ user->private.full_name = "";
+ user->private.home_dir = "";
+ user->private.logon_script = "";
+ user->private.profile_path = "";
+ user->private.acct_desc = "";
+ user->private.workstations = "";
+ user->private.unknown_str = "";
+ user->private.munged_dial = "";
}
static void destroy_pdb_talloc(SAM_ACCOUNT **user)
* @todo Redefine this to NULL, but this changes the API becouse
* much of samba assumes that the pdb_get...() funtions
* return pstrings. (ie not null-pointers).
+ * See also pdb_fill_default_sam().
*/
#define PDB_NOT_QUITE_NULL ""