summaryrefslogtreecommitdiff
path: root/source3/msrpc/msrpcd_process.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-12-12 21:00:35 +0000
committerLuke Leighton <lkcl@samba.org>1999-12-12 21:00:35 +0000
commitf6276724bafdb6145c0c7b565172d80cb04516ea (patch)
treedc898b2020b32c12b02724fb7209bde351afe47e /source3/msrpc/msrpcd_process.c
parent4f8a24522c683761c6f2ee23dba56f6c7913377b (diff)
downloadsamba-f6276724bafdb6145c0c7b565172d80cb04516ea.tar.gz
samba-f6276724bafdb6145c0c7b565172d80cb04516ea.tar.bz2
samba-f6276724bafdb6145c0c7b565172d80cb04516ea.zip
changed function name of get_home_dir() to get_unixhome_dir(), to stop
clash with gnu readline library. fixed issue with [homes] service not being there - call lp_add_home() just before starting the msrpc processing. (This used to be commit 054195df9b6187c663ede5cf4489499abbdc29fc)
Diffstat (limited to 'source3/msrpc/msrpcd_process.c')
-rw-r--r--source3/msrpc/msrpcd_process.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/msrpc/msrpcd_process.c b/source3/msrpc/msrpcd_process.c
index 240087be14..35a28d105a 100644
--- a/source3/msrpc/msrpcd_process.c
+++ b/source3/msrpc/msrpcd_process.c
@@ -355,6 +355,7 @@ BOOL msrpcd_init(int c, pipes_struct *p)
{
struct user_creds usr;
gid_t *groups = NULL;
+ char *user;
if (!get_user_creds(c, &usr))
{
@@ -405,6 +406,19 @@ BOOL msrpcd_init(int c, pipes_struct *p)
ZERO_STRUCTP(p->l);
+ user = usr.uxc.user_name;
+ if (!strequal(user,lp_guestaccount(-1)) &&
+ lp_servicenumber(user) < 0)
+ {
+ int homes = lp_servicenumber(HOMES_NAME);
+ char *home = get_unixhome_dir(user);
+ if (homes >= 0 && home)
+ {
+ pstring home_dir;
+ fstrcpy(home_dir, home);
+ lp_add_home(user,homes,home_dir);
+ }
+ }
return True;
}