20040428: In pkg_add, set the umask nice and early, and remove an absolute
setting of mode in a mkdir command.
This commit is contained in:
parent
8f451cfae0
commit
f3215814d5
@ -1,11 +1,11 @@
|
||||
/* $NetBSD: perform.c,v 1.99 2004/04/21 20:10:10 tv Exp $ */
|
||||
/* $NetBSD: perform.c,v 1.100 2004/04/28 15:37:29 tv Exp $ */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#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.99 2004/04/21 20:10:10 tv Exp $");
|
||||
__RCSID("$NetBSD: perform.c,v 1.100 2004/04/28 15:37:29 tv Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -128,6 +128,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) {
|
||||
@ -360,7 +362,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);
|
||||
@ -723,7 +725,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");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: version.h,v 1.49 2004/04/21 20:10:11 tv Exp $ */
|
||||
/* $NetBSD: version.h,v 1.50 2004/04/28 15:37:29 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_ */
|
||||
|
Loading…
Reference in New Issue
Block a user