svn commit: samba r22113 - in branches: SAMBA_3_0/source/lib
SAMBA_3_0_25/source/lib
jra at samba.org
jra at samba.org
Fri Apr 6 22:08:44 GMT 2007
Author: jra
Date: 2007-04-06 22:08:44 +0000 (Fri, 06 Apr 2007)
New Revision: 22113
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22113
Log:
Fix core dump when configfile in same directory.
>From Steven Danneman <steven.danneman at isilon.com>.
Jeremy.
Modified:
branches/SAMBA_3_0/source/lib/pidfile.c
branches/SAMBA_3_0_25/source/lib/pidfile.c
Changeset:
Modified: branches/SAMBA_3_0/source/lib/pidfile.c
===================================================================
--- branches/SAMBA_3_0/source/lib/pidfile.c 2007-04-06 21:55:44 UTC (rev 22112)
+++ branches/SAMBA_3_0/source/lib/pidfile.c 2007-04-06 22:08:44 UTC (rev 22113)
@@ -93,6 +93,13 @@
strncpy( name, program_name, sizeof( name)-1);
} else {
short_configfile = strrchr( dyn_CONFIGFILE, '/');
+ if (short_configfile == NULL) {
+ /* conf file in current directory */
+ short_configfile = dyn_CONFIGFILE;
+ } else {
+ /* full/relative path provided */
+ short_configfile++;
+ }
slprintf( name, sizeof( name)-1, "%s-%s", program_name, short_configfile+1);
}
Modified: branches/SAMBA_3_0_25/source/lib/pidfile.c
===================================================================
--- branches/SAMBA_3_0_25/source/lib/pidfile.c 2007-04-06 21:55:44 UTC (rev 22112)
+++ branches/SAMBA_3_0_25/source/lib/pidfile.c 2007-04-06 22:08:44 UTC (rev 22113)
@@ -93,6 +93,13 @@
strncpy( name, program_name, sizeof( name)-1);
} else {
short_configfile = strrchr( dyn_CONFIGFILE, '/');
+ if (short_configfile == NULL) {
+ /* conf file in current directory */
+ short_configfile = dyn_CONFIGFILE;
+ } else {
+ /* full/relative path provided */
+ short_configfile++;
+ }
slprintf( name, sizeof( name)-1, "%s-%s", program_name, short_configfile+1);
}
More information about the samba-cvs
mailing list