summaryrefslogtreecommitdiff
path: root/source3/smbd/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/server.c')
-rw-r--r--source3/smbd/server.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index c2880b0e89..9c25a21000 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -4569,6 +4569,15 @@ void standard_sub(int cnum,char *str)
case 'S' : string_sub(p,"%S",lp_servicename(Connections[cnum].service)); break;
case 'g' : string_sub(p,"%g",gidtoname(Connections[cnum].gid)); break;
case 'u' : string_sub(p,"%u",Connections[cnum].user); break;
+ /*
+ * Patch from jkf@soton.ac.uk
+ * Left the %N (NIS server name) in standard_sub_basic as it
+ * is a feature for logon servers, hence uses the username.
+ * The %p (NIS server path) code is here as it is used
+ * instead of the default "path =" string in [homes] and so
+ * needs the service name, not the username.
+ */
+ case 'p' : string_sub(p,"%p",automount_path(lp_servicename(Connections[cnum].service))); break;
case '\0' : p++; break; /* don't run off the end of the string */
default : p+=2; break;
}