scan for revoke()

This commit is contained in:
tg 2007-01-17 23:27:47 +00:00
parent af606537e2
commit 65a2806e81
3 changed files with 12 additions and 7 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $MirOS: src/bin/mksh/Build.sh,v 1.132 2007/01/17 23:18:55 tg Exp $
# $MirOS: src/bin/mksh/Build.sh,v 1.133 2007/01/17 23:27:47 tg Exp $
#-
# Env: CC, CFLAGS, CPP, CPPFLAGS, LDFLAGS, LIBS, NOWARN, NROFF, TARGET_OS
# CPPFLAGS recognised: MKSH_SMALL MKSH_NOPWNAM
@ -387,6 +387,11 @@ ac_test langinfo_codeset setlocale_ctype 0 'nl_langinfo(CODESET)' <<-'EOF'
int main(void) { return ((ptrdiff_t)(void *)nl_langinfo(CODESET)); }
EOF
ac_test revoke <<-'EOF'
#include <unistd.h>
int main(int ac, char *av[]) { return (ac + revoke(av[0])); }
EOF
ac_test setmode mksh_full 1 <<-'EOF'
#if defined(__MSVCRT__) || defined(__CYGWIN__)
#error Win32 setmode() is different from what we need

View File

@ -1,4 +1,4 @@
# $MirOS: src/bin/mksh/Makefile,v 1.25 2007/01/17 23:18:55 tg Exp $
# $MirOS: src/bin/mksh/Makefile,v 1.26 2007/01/17 23:27:47 tg Exp $
PROG= mksh
SRCS= alloc.c edit.c eval.c exec.c expr.c funcs.c histrap.c \
@ -8,9 +8,9 @@ CPPFLAGS+= -DHAVE_SYS_PARAM_H -DHAVE_SYS_SYSMACROS_H=0 -DHAVE_LIBGEN_H
CPPFLAGS+= -DHAVE_STDBOOL_H -DHAVE_RLIM_T
CPPFLAGS+= -DHAVE_SYS_SIGNAME -DHAVE_SYS_SIGLIST
CPPFLAGS+= -DHAVE_ARC4RANDOM -DHAVE_ARC4RANDOM_PUSH -DHAVE_SETLOCALE_CTYPE
CPPFLAGS+= -DHAVE_LANGINFO_CODESET -DHAVE_SETMODE -DHAVE_SETRESUGID
CPPFLAGS+= -DHAVE_SETGROUPS -DHAVE_STRCASESTR -DHAVE_STRLCPY
CPPFLAGS+= -DHAVE_MULTI_IDSTRING
CPPFLAGS+= -DHAVE_LANGINFO_CODESET -DHAVE_REVOKE -DHAVE_SETMODE
CPPFLAGS+= -DHAVE_SETRESUGID -DHAVE_SETGROUPS -DHAVE_STRCASESTR
CPPFLAGS+= -DHAVE_STRLCPY -DHAVE_MULTI_IDSTRING
CDIAGFLAGS+= -Wno-cast-qual
LINKS+= ${BINDIR}/${PROG} ${BINDIR}/sh

4
misc.c
View File

@ -6,7 +6,7 @@
#include <grp.h>
#endif
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.44 2006/11/19 20:43:13 tg Exp $\t"
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.45 2007/01/17 23:27:47 tg Exp $\t"
MKSH_SH_H_ID);
#undef USE_CHVT
@ -1340,7 +1340,7 @@ parse_T(char *fn)
warningf(false, "chvt: cannot chown root %s", fn);
if (((sb.st_mode & 07777) != 0600) && chmod(fn, 0600))
warningf(false, "chvt: cannot chmod 0600 %s", fn);
#if !defined(__sun__) && !defined(__gnu_linux__) && !defined(__INTERIX)
#if !HAVE_REVOKE
if (revoke(fn))
warningf(false, "chvt: cannot revoke %s", fn);
#endif