mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-26 13:05:18 +01:00
If CONFIG_NO_CLOBBER_EVER is defined (e.g., in /etc/make.conf), don't make
it possible for config to ever blow away a work directory. Default behavior remains broken.
This commit is contained in:
parent
3344d6f2a6
commit
8e7fbe0241
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=12508
@ -8,5 +8,8 @@ MAN8= config.8
|
||||
DPADD= ${LIBL}
|
||||
LDADD= -ll
|
||||
CLEANFILES+= config.c lang.c lex.yy.c y.tab.[ch]
|
||||
.if defined(CONFIG_NO_CLOBBER_EVER)
|
||||
CFLAGS+=-DNO_CLOBBER_EVER
|
||||
.endif
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -116,6 +116,7 @@ usage: fputs("usage: config [-gpn] sysname\n", stderr);
|
||||
fprintf(stderr, "config: %s isn't a directory.\n", p);
|
||||
exit(2);
|
||||
}
|
||||
#ifndef NO_CLOBBER_EVER
|
||||
else if (!no_config_clobber) {
|
||||
char tmp[strlen(p) + 8];
|
||||
|
||||
@ -133,6 +134,7 @@ usage: fputs("usage: config [-gpn] sysname\n", stderr);
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
loadaddress = -1;
|
||||
dtab = NULL;
|
||||
confp = &conf_list;
|
||||
|
Loading…
Reference in New Issue
Block a user