summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/ipc.c31
-rw-r--r--source3/smbd/password.c35
2 files changed, 2 insertions, 64 deletions
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c
index 142f139d26..466781c58c 100644
--- a/source3/smbd/ipc.c
+++ b/source3/smbd/ipc.c
@@ -1999,9 +1999,6 @@ static BOOL api_RNetUserGetInfo(int cnum,uint16 vuid, char *param,char *data,
/* get NIS home of a previously validated user - simeon */
user_struct *vuser = get_valid_user_struct(vuid);
DEBUG(3,(" Username of UID %d is %s\n", vuser->uid, vuser->name));
-#if (defined(NETGROUP) && defined(AUTOMOUNT))
- DEBUG(3,(" HOMESHR for %s is %s\n", vuser->name, vuser->home_share));
-#endif
*rparam_len = 6;
*rparam = REALLOC(*rparam,*rparam_len);
@@ -2059,19 +2056,7 @@ static BOOL api_RNetUserGetInfo(int cnum,uint16 vuid, char *param,char *data,
SIVAL(p,usri11_auth_flags,AF_OP_PRINT); /* auth flags */
SIVALS(p,usri11_password_age,0xffffffff); /* password age */
SIVAL(p,usri11_homedir,PTR_DIFF(p2,p)); /* home dir */
- if (*lp_logon_path())
- {
- strcpy(p2,lp_logon_path());
- }
- else
- {
-#if (defined(NETGROUP) && defined(AUTOMOUNT))
- strcpy(p2, vuser->home_share);
-#else
- strcpy(p2,"\\\\%L\\%U");
-#endif
- }
- standard_sub_basic(p2);
+ strcpy(p2, lp_logon_path());
p2 = skip_string(p2,1);
SIVAL(p,usri11_parms,PTR_DIFF(p2,p)); /* parms */
strcpy(p2,"");
@@ -2107,19 +2092,7 @@ static BOOL api_RNetUserGetInfo(int cnum,uint16 vuid, char *param,char *data,
SSVAL(p,42,
Connections[cnum].admin_user?USER_PRIV_ADMIN:USER_PRIV_USER);
SIVAL(p,44,PTR_DIFF(p2,*rdata)); /* home dir */
- if (*lp_logon_path())
- {
- strcpy(p2,lp_logon_path());
- }
- else
- {
-#if (defined(NETGROUP) && defined(AUTOMOUNT))
- strcpy(p2, vuser->home_share);
-#else
- strcpy(p2,"\\\\%L\\%U");
-#endif
- }
- standard_sub_basic(p2);
+ strcpy(p2,lp_logon_path());
p2 = skip_string(p2,1);
SIVAL(p,48,PTR_DIFF(p2,*rdata)); /* comment */
*p2++ = 0;
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 2da8a8f936..311ef47679 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -155,15 +155,6 @@ tell random client vuid's (normally zero) from valid vuids.
uint16 register_vuid(int uid,int gid, char *name,BOOL guest)
{
user_struct *vuser;
-
-#if (defined(NETGROUP) && defined (AUTOMOUNT))
- int nis_error; /* returned by yp all functions */
- char *nis_result; /* yp_match inits this */
- int nis_result_len; /* and set this */
- char *nis_domain; /* yp_get_default_domain inits this */
- char *nis_map = (char *)lp_nis_home_map_name();
- int home_server_len;
-#endif
struct passwd *pwfile; /* for getting real name from passwd file */
#if 0
@@ -224,32 +215,6 @@ uint16 register_vuid(int uid,int gid, char *name,BOOL guest)
DEBUG(3,("uid %d registered to name %s\n",uid,name));
-#if (defined(NETGROUP) && defined (AUTOMOUNT))
- vuser->home_share = NULL;
- DEBUG(3, ("Setting default HOMESHR to: \\\\logon server\\HOMES\n"));
- vuser->home_share = Realloc(vuser->home_share, 32);
- strcpy(vuser->home_share,"\\\\%L\\%U");
-
- if ((nis_error = yp_get_default_domain(&nis_domain)) != 0)
- DEBUG(3, ("YP Error: %s\n", yperr_string(nis_error)));
- DEBUG(3, ("NIS Domain: %s\n", nis_domain));
-
- if ((nis_error = yp_match(nis_domain, nis_map, vuser->name, strlen(vuser->name),
- &nis_result, &nis_result_len)) != 0)
- DEBUG(3, ("YP Error: %s\n", yperr_string(nis_error)));
- if (!nis_error && lp_nis_home_map()) {
- home_server_len = strcspn(nis_result,":");
- DEBUG(3, ("NIS lookup succeeded\n\tHome server length: %d\n",home_server_len));
- vuser->home_share = (char *)Realloc(vuser->home_share, home_server_len+12);
- DEBUG(3, ("\tAllocated %d bytes for HOMESHR\n",home_server_len+12 ));
- strcpy(vuser->home_share,"\\\\");
- strncat(vuser->home_share, nis_result, home_server_len);
- strcat(vuser->home_share,"\\homes");
- DEBUG(2,("\tUser = %s\n\tUID = %d\n\tNIS result = %s\n\tHOMESHR = %s\n",
- vuser->name, vuser->uid, nis_result, vuser->home_share));
- }
-#endif
-
DEBUG(3, ("Clearing default real name\n"));
fstrcpy(vuser->real_name, "<Full Name>\0");
if (lp_unix_realname()) {