summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd/lock.c
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2005-03-05 04:29:24 +0000
committerRich Megginson <rmeggins@redhat.com>2005-03-05 04:29:24 +0000
commitb352660e243c7b9b7d050f1c38cff1c9faf278b1 (patch)
treeede08019beb931c3206609ab2377a015d510bdb4 /ldap/servers/slapd/lock.c
parentf08951680ddfebc3f3df07e720ad0650fe473c0f (diff)
downloadds-b352660e243c7b9b7d050f1c38cff1c9faf278b1.tar.gz
ds-b352660e243c7b9b7d050f1c38cff1c9faf278b1.tar.xz
ds-b352660e243c7b9b7d050f1c38cff1c9faf278b1.zip
clean up sprintf usage and many other flawfinder issues; clean up compiler warnings on Linux; remove pam_passthru from DS 7.1
Diffstat (limited to 'ldap/servers/slapd/lock.c')
-rw-r--r--ldap/servers/slapd/lock.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ldap/servers/slapd/lock.c b/ldap/servers/slapd/lock.c
index ef21b841..6f13497e 100644
--- a/ldap/servers/slapd/lock.c
+++ b/ldap/servers/slapd/lock.c
@@ -25,8 +25,7 @@ lock_fopen( char *fname, char *type, FILE **lfp )
char buf[MAXPATHLEN];
/* open the lock file */
- strcpy( buf, fname );
- strcat( buf, ".lock" );
+ PR_snprintf( buf, MAXPATHLEN, "%s%s", fname, ".lock" );
if ( (*lfp = fopen( buf, "w" )) == NULL ) {
LDAPDebug( LDAP_DEBUG_ANY, "could not open \"%s\"\n", buf, 0, 0 );
return( NULL );