Monday, May 2, 2016

[389-commits] ldap/servers

ldap/servers/slapd/globals.c | 2 +-
ldap/servers/slapd/main.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3348bcf568ebd63c683df4c93335aacecfe147ee
Author: William Brown <firstyear@redhat.com>
Date: Tue Apr 26 14:30:39 2016 +1000

Ticket 47951 - Fix startpid from altering dev/null

Bug Description: If startpid (-w) was not added to the server, Ds would change
attributes of dev/null

Fix Description: Remove the hardcoded /dev/null, and do a proper check for
if the start pid should be written.

https://fedorahosted.org/389/ticket/47951

Author: wibrown

Review by: lkrispen (Thanks!)

diff --git a/ldap/servers/slapd/globals.c b/ldap/servers/slapd/globals.c
index 12540f4..003ffed 100644
--- a/ldap/servers/slapd/globals.c
+++ b/ldap/servers/slapd/globals.c
@@ -54,7 +54,7 @@ Slapi_Counter *conns_in_maxthreads;
Connection_Table *the_connection_table = NULL;

char *pid_file = "/dev/null";
-char *start_pid_file = "/dev/null";
+char *start_pid_file = NULL;

char *attr_dataversion = ATTR_DATAVERSION;

diff --git a/ldap/servers/slapd/main.c b/ldap/servers/slapd/main.c
index c04408c..e7d88eb 100644
--- a/ldap/servers/slapd/main.c
+++ b/ldap/servers/slapd/main.c
@@ -545,7 +545,7 @@ write_start_pid_file()
* admin programs. Please do not make changes here without
* consulting the start/stop code for the admin code.
*/
- if ( (fp = fopen( start_pid_file, "w" )) != NULL ) {
+ if ( (start_pid_file != NULL) && (fp = fopen( start_pid_file, "w" )) != NULL ) {
fprintf( fp, "%d\n", getpid() );
fclose( fp );
if ( chmod(start_pid_file, S_IWUSR|S_IRUSR|S_IRGRP|S_IROTH) != 0 ) {

--
389-commits mailing list
389-commits@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/389-commits@lists.fedoraproject.org

No comments:

Post a Comment