[prev in list] [next in list] [prev in thread] [next in thread] 

List:       samba-technical
Subject:    pid_directory error in testparm?
From:       Michael Tokarev via samba-technical <samba-technical () lists ! samba ! org>
Date:       2022-04-26 9:42:48
Message-ID: ff4e3861-adca-cb4e-55ed-2fc7471dc0f5 () msgid ! tls ! msk ! ru
[Download RAW message or body]

Hi!

I noticed testparm is failing when samba pid directory does not exist.
However, some samba daemons do create this directory automatically, and
as far as I can see, samba can be started just fine without this directory
(maybe not all daemons do this, I'm not sure yet).

How about something like the attached change for testparam.c, to denote
this condition from being ERROR to a mere WARNING instead?

Thanks,

/mjt
["testparm-do-not-fail-if-pid-dir-does-not-exists.patch" (text/x-patch)]

diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c
index 2d717f19756..6d6e462d084 100644
--- a/source3/utils/testparm.c
+++ b/source3/utils/testparm.c
@@ -283,9 +283,8 @@ static int do_global_checks(void)
 	}
 
 	if (!directory_exist_stat(lp_pid_directory(), &st)) {
-		fprintf(stderr, "ERROR: pid directory %s does not exist\n\n",
+		fprintf(stderr, "WARNING: pid directory %s does not exist\n\n",
 		       lp_pid_directory());
-		ret = 1;
 	}
 
 	if (lp_passdb_expand_explicit()) {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic