return NT_STATUS_NO_MEMORY;
}
- if ( !(pwd = getpwnam_alloc(result, username)) ) {
+ if ( !(pwd = Get_Pwnam_alloc(result, username)) ) {
DEBUG(1, ("User %s in passdb, but getpwnam() fails!\n",
pdb_get_username(sampass)));
TALLOC_FREE(result);
* about the mapping of guest sid to lp_guestaccount()
* username and will return the unix_pw info for a guest
* user. Use it if it's there, else lookup the *uid details
- * using getpwnam_alloc(). See bug #6291 for details. JRA.
+ * using Get_Pwnam_alloc(). See bug #6291 for details. JRA.
*/
/* We must always assign the *uid. */
if (sam_acct->unix_pw == NULL) {
- struct passwd *pwd = getpwnam_alloc(sam_acct, *found_username );
+ struct passwd *pwd = Get_Pwnam_alloc(sam_acct, *found_username );
if (!pwd) {
- DEBUG(10, ("getpwnam_alloc failed for %s\n",
+ DEBUG(10, ("Get_Pwnam_alloc failed for %s\n",
*found_username));
result = NT_STATUS_NO_SUCH_USER;
goto done;
struct passwd *pwd;
NTSTATUS status;
- pwd = getpwnam_alloc(talloc_tos(), username);
+ pwd = Get_Pwnam_alloc(talloc_tos(), username);
if (pwd == NULL) {
return NT_STATUS_NO_SUCH_USER;
}
char *p;
uid_t u;
- pass = getpwnam_alloc(talloc_autofree_context(), name);
+ pass = Get_Pwnam_alloc(talloc_autofree_context(), name);
if (pass) {
u = pass->pw_uid;
TALLOC_FREE(pass);
NTSTATUS result;
const char *guestname = lp_guestaccount();
- if ( !(pwd = getpwnam_alloc(talloc_autofree_context(), guestname ) ) ) {
+ if ( !(pwd = Get_Pwnam_alloc(talloc_autofree_context(), guestname ) ) ) {
DEBUG(0,("guest_user_info: Unable to locate guest account [%s]!\n",
guestname));
return False;
/* Ignore the primary group SID. Honor the real Unix primary group.
The primary group SID is only of real use to Windows clients */
- if ( !(pw = getpwnam_alloc(mem_ctx, username)) ) {
+ if ( !(pw = Get_Pwnam_alloc(mem_ctx, username)) ) {
return NT_STATUS_NO_SUCH_USER;
}
/* If the user specified a RID, make sure its able to be both stored and retreived */
if (rid == DOMAIN_USER_RID_GUEST) {
- struct passwd *passwd = getpwnam_alloc(NULL, lp_guestaccount());
+ struct passwd *passwd = Get_Pwnam_alloc(NULL, lp_guestaccount());
if (!passwd) {
DEBUG(0, ("Could not find guest account via getpwnam()! (%s)\n", lp_guestaccount()));
return False;
{
struct passwd *pwd;
- pwd = getpwnam_alloc(talloc_autofree_context(), name);
+ pwd = Get_Pwnam_alloc(talloc_autofree_context(), name);
if (pwd == NULL) {
return False;
}
return result;
}
- pwd = getpwnam_alloc(talloc_tos(), username);
+ pwd = Get_Pwnam_alloc(talloc_tos(), username);
if ((pwd == NULL) || (pwd->pw_dir[0] == '\0')) {
DEBUG(3, ("No home directory defined for user '%s'\n",
{
struct passwd *pass;
- pass = getpwnam_alloc(talloc_autofree_context(), lp_guestaccount());
+ pass = Get_Pwnam_alloc(talloc_autofree_context(), lp_guestaccount());
if (!pass) {
return false;
}
exit(1);
}
- if ((pwd = getpwnam_alloc(ctx, unix_user)) == NULL) {
+ if ((pwd = Get_Pwnam_alloc(ctx, unix_user)) == NULL) {
fprintf(stderr, "Error getting user information for %s\n", unix_user);
exit(1);
}
d_printf(_("Adding the Guest user.\n"));
- pwd = getpwnam_alloc(tc, lp_guestaccount());
+ pwd = Get_Pwnam_alloc(tc, lp_guestaccount());
if (!pwd) {
if (domusers_gid == -1) {
d_printf(_("Checking Guest's group.\n"));
- pwd = getpwnam_alloc(talloc_autofree_context(), lp_guestaccount());
+ pwd = Get_Pwnam_alloc(talloc_autofree_context(), lp_guestaccount());
if (!pwd) {
d_fprintf(stderr,
_("Failed to find just created Guest account!\n"
exit(0);
}
- pwd = getpwnam_alloc(talloc_autofree_context(), user);
+ pwd = Get_Pwnam_alloc(talloc_autofree_context(), user);
if (!pwd) {
printf("%sCannot find user %s<br>%s\n", head, user, tail);
exit(0);
* Try and get the user from the UNIX password file.
*/
- pass = getpwnam_alloc(talloc_autofree_context(), user);
+ pass = Get_Pwnam_alloc(talloc_autofree_context(), user);
/*
* Validate the password they have given.