summaryrefslogtreecommitdiff
path: root/security/nss/cmd/shlibsign
diff options
context:
space:
mode:
authorrelyea%netscape.com <devnull@localhost>2003-02-05 00:29:35 +0000
committerrelyea%netscape.com <devnull@localhost>2003-02-05 00:29:35 +0000
commitd36c0a020f717e2cea423fd9a9f503809fc07901 (patch)
tree5942ac85b0cab5875365a8565d1360d829dffcc7 /security/nss/cmd/shlibsign
parent0998885cc9ee16016ff7d7f8a4cb3a9582fe97d6 (diff)
downloadnss-hg-d36c0a020f717e2cea423fd9a9f503809fc07901.tar.gz
1) turn on mangle builds.
2) better fix for the missing MAXPATHLEN missing define. 3) make room for the '\0' in the pathname.
Diffstat (limited to 'security/nss/cmd/shlibsign')
-rw-r--r--security/nss/cmd/shlibsign/manifest.mn2
-rw-r--r--security/nss/cmd/shlibsign/shlibsign.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/security/nss/cmd/shlibsign/manifest.mn b/security/nss/cmd/shlibsign/manifest.mn
index 549bc9855..40cdeeff1 100644
--- a/security/nss/cmd/shlibsign/manifest.mn
+++ b/security/nss/cmd/shlibsign/manifest.mn
@@ -55,4 +55,6 @@ REQUIRES = dbm seccmd
PROGRAM = shlibsign
+DIRS = mangle
+
#USE_STATIC_LIBS = 1
diff --git a/security/nss/cmd/shlibsign/shlibsign.c b/security/nss/cmd/shlibsign/shlibsign.c
index 7f2dacc2f..b43658b46 100644
--- a/security/nss/cmd/shlibsign/shlibsign.c
+++ b/security/nss/cmd/shlibsign/shlibsign.c
@@ -52,16 +52,14 @@
#include "pk11sdr.h"
#include "secrng.h"
#include "shsign.h"
+#include "pk11pqg.h"
#ifdef USES_LINKS
#include "libgen.h"
#include "unistd.h"
+#include "sys/param.h"
#include "sys/types.h"
#include "sys/stat.h"
-
-#ifndef MAXPATHLEN
-#define MAXPATHLEN 1024
-#endif
#endif
static void
@@ -159,7 +157,7 @@ main (int argc, char **argv)
#ifdef USES_LINKS
int ret;
struct stat stat_buf;
- char link_buf[MAXPATHLEN];
+ char link_buf[MAXPATHLEN+1];
char *link_file = NULL;
#endif
@@ -262,7 +260,7 @@ main (int argc, char **argv)
}
if (S_ISLNK(stat_buf.st_mode)) {
char *path,*dirpath;
- ret = readlink(input_file, link_buf, sizeof(link_buf));
+ ret = readlink(input_file, link_buf, sizeof(link_buf) - 1);
if (ret < 0) {
perror(input_file);
goto loser;