#include "libcli/composite/composite.h"
#include "winbind/wb_server.h"
#include "winbind/wb_async_helpers.h"
+#include "param/param.h"
#include "winbind/wb_helper.h"
#include "smbd/service_task.h"
-#include "nsswitch/winbindd_nss.h"
#include "libnet/libnet_proto.h"
-#include "param/proto.h"
#include "libcli/security/proto.h"
struct cmd_getpwnam_state {
user_info = talloc(state, struct libnet_UserInfo);
if (composite_nomem(user_info, state->ctx)) return;
- ok= wb_samba3_split_username(state, state->name, &user_dom, &user_name);
+ ok= wb_samba3_split_username(state, state->service->task->lp_ctx, state->name, &user_dom, &user_name);
if(!ok){
composite_error(state->ctx, NT_STATUS_OBJECT_NAME_INVALID);
return;
WBSRV_SAMBA3_SET_STRING(pw->pw_name, user_info->out.account_name);
WBSRV_SAMBA3_SET_STRING(pw->pw_passwd, "*");
WBSRV_SAMBA3_SET_STRING(pw->pw_gecos, user_info->out.full_name);
- WBSRV_SAMBA3_SET_STRING(pw->pw_dir, lp_template_homedir());
+ WBSRV_SAMBA3_SET_STRING(pw->pw_dir,
+ lp_template_homedir(state->service->task->lp_ctx));
all_string_sub(pw->pw_dir, "%WORKGROUP%", state->workgroup_name,
sizeof(fstring) - 1);
all_string_sub(pw->pw_dir, "%ACCOUNTNAME%", user_info->out.account_name,
sizeof(fstring) - 1);
- WBSRV_SAMBA3_SET_STRING(pw->pw_shell, lp_template_shell());
+ WBSRV_SAMBA3_SET_STRING(pw->pw_shell,
+ lp_template_shell(state->service->task->lp_ctx));
state->group_sid = dom_sid_dup(state, user_info->out.primary_group_sid);
if(composite_nomem(state->group_sid, state->ctx)) return;