From 48a6e9fd76a9af9fb459a66d0d1d895f412b7653 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 21 Jun 2004 17:51:06 +0000 Subject: r1212: small change to prevent home directories added during the SMBsesssetup&X tfrom being removed as unused services (This used to be commit 951a88519467736fffd80ff962f1df71b04c9c2f) --- source3/param/loadparm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 5e959dbba3..a163caefc3 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -2319,6 +2319,8 @@ BOOL lp_add_home(const char *pszHomename, int iDefaultService, ServicePtrs[i]->bBrowseable = sDefault.bBrowseable; + ServicePtrs[i]->autoloaded = True; + DEBUG(3, ("adding home's share [%s] for user '%s' at '%s'\n", pszHomename, user, newHomedir)); @@ -3699,6 +3701,10 @@ void lp_killunused(BOOL (*snumused) (int)) if (!VALID(i)) continue; + /* don't kill autoloaded services */ + if ( ServicePtrs[i]->autoloaded ) + continue; + if (!snumused || !snumused(i)) { ServicePtrs[i]->valid = False; free_service(ServicePtrs[i]); -- cgit