don't allow ".." in service name when doing "default service"
authorAndrew Tridgell <tridge@samba.org>
Sun, 29 Nov 1998 06:23:16 +0000 (06:23 +0000)
committerAndrew Tridgell <tridge@samba.org>
Sun, 29 Nov 1998 06:23:16 +0000 (06:23 +0000)
processing.
(This used to be commit 702263bba555a1d7c7999d40e5789b7e920dbce4)

source3/smbd/service.c

index b4a1115867d76ef6216c14d16bc5067b8fe1dd14..bc7fb88387eec93c9ba21f654b0d1937965ef6e5 100644 (file)
@@ -146,7 +146,9 @@ int find_service(char *service)
    if (iService < 0) 
    {
      char *pdefservice = lp_defaultservice();
-     if (pdefservice && *pdefservice && !strequal(pdefservice,service))
+     if (pdefservice && *pdefservice && 
+        !strequal(pdefservice,service) &&
+        !strstr(service,".."))
      {
        /*
         * We need to do a local copy here as lp_defaultservice()