summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortv <tv@pkgsrc.org>2004-04-28 15:38:17 +0000
committertv <tv@pkgsrc.org>2004-04-28 15:38:17 +0000
commit930f375cd49f4e6aba23c89aa70a7e422367d5c4 (patch)
treec359f7bcabd87fca3884a612e7975be25ee671aa
parentfaaed608d9d57400ab5ae3bf47a0d0802e05d1e5 (diff)
downloadpkgsrc-930f375cd49f4e6aba23c89aa70a7e422367d5c4.tar.gz
20040428: In pkg_add, set the umask nice and early, and remove an absolute
setting of mode in a mkdir command.
-rw-r--r--pkgtools/pkg_install/files/add/perform.c9
-rw-r--r--pkgtools/pkg_install/files/lib/version.h4
2 files changed, 7 insertions, 6 deletions
diff --git a/pkgtools/pkg_install/files/add/perform.c b/pkgtools/pkg_install/files/add/perform.c
index 68d260173dc..ae2fb27de44 100644
--- a/pkgtools/pkg_install/files/add/perform.c
+++ b/pkgtools/pkg_install/files/add/perform.c
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.21 2004/04/21 20:11:55 tv Exp $ */
+/* $NetBSD: perform.c,v 1.22 2004/04/28 15:38:17 tv Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -11,7 +11,7 @@
#if 0
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp";
#else
-__RCSID("$NetBSD: perform.c,v 1.21 2004/04/21 20:11:55 tv Exp $");
+__RCSID("$NetBSD: perform.c,v 1.22 2004/04/28 15:38:17 tv Exp $");
#endif
#endif
@@ -146,6 +146,8 @@ pkg_do(const char *pkg)
memset(buildinfo, '\0', sizeof(buildinfo));
inPlace = 0;
+ umask(DEF_UMASK);
+
/* Are we coming in for a second pass, everything already extracted?
* (Slave mode) */
if (!pkg) {
@@ -378,7 +380,7 @@ pkg_do(const char *pkg)
/* make sure dbdir actually exists! */
if (!(isdir(dbdir) || islinktodir(dbdir))) {
- if (fexec("mkdir", "-m", "755", "-p", dbdir, NULL)) {
+ if (fexec("mkdir", "-p", dbdir, NULL)) {
errx(EXIT_FAILURE,
"Database-dir %s cannot be generated, aborting.",
dbdir);
@@ -741,7 +743,6 @@ ignore_replace_depends_check:
if (!NoRecord && !Fake) {
char contents[FILENAME_MAX];
- umask(DEF_UMASK);
#ifndef __INTERIX
if (getuid() != 0)
warnx("not running as root - trying to record install anyway");
diff --git a/pkgtools/pkg_install/files/lib/version.h b/pkgtools/pkg_install/files/lib/version.h
index 47f79c4ba09..184ee90730b 100644
--- a/pkgtools/pkg_install/files/lib/version.h
+++ b/pkgtools/pkg_install/files/lib/version.h
@@ -1,4 +1,4 @@
-/* $NetBSD: version.h,v 1.27 2004/04/21 20:11:55 tv Exp $ */
+/* $NetBSD: version.h,v 1.28 2004/04/28 15:38:17 tv Exp $ */
/*
* Copyright (c) 2001 Thomas Klausner. All rights reserved.
@@ -33,6 +33,6 @@
#ifndef _INST_LIB_VERSION_H_
#define _INST_LIB_VERSION_H_
-#define PKGTOOLS_VERSION "20040421"
+#define PKGTOOLS_VERSION "20040428"
#endif /* _INST_LIB_VERSION_H_ */