624) inttypes.h is now included when appropriate if it is present.
625) Simplified alias allocation in the parser.
+
+Sudo 1.6.9p6 released.
+
+626) Go back to using TCSAFLUSH instead of TCSADRAIN when turning
+ off echo in tgetpass().
+
+627) Fixed addition of -lutil for logincap on FreeBSD and NetBSD.
+
+628) Add configure check for struct in6_addr since some systems define
+ AF_INET6 but have no real IPv6 support.
+
+Sudo 1.6.9p7 released.
+
+629) Fixed a bug where a sudoers entry with no runas user specified
+ was treated differently from a line with the default runas
+ user specified.
+
+Sudo 1.6.9p8 released.
#
# @configure_input@
#
-# $Sudo: Makefile.in,v 1.246.2.16 2007/10/09 13:29:20 millert Exp $
+# $Sudo: Makefile.in,v 1.246.2.18 2007/11/02 19:15:16 millert Exp $
#
#### Start of system configuration section. ####
LIBOBJS = @LIBOBJS@ @ALLOCA@
-VERSION = 1.6.9p6
+VERSION = 1.6.9p8
DISTFILES = $(SRCS) $(HDRS) BUGS CHANGES HISTORY INSTALL INSTALL.configure \
LICENSE Makefile.in PORTING README README.LDAP \
unfathomable. A "cd" command is totally useless since a child process
cannot affect the current working directory of the parent (your shell).
-Q) When I run sudo it says I am not alllowed to run the command as root
+Q) When I run sudo it says I am not allowed to run the command as root
but I don't want to run it as root, I want to run it as another user.
My sudoers file entry looks like:
bob ALL=(oracle) ALL
/* Define to 1 if your Kerberos is Heimdal. */
#undef HAVE_HEIMDAL
+/* Define to 1 if <netinet/in.h> contains struct in6_addr. */
+#undef HAVE_IN6_ADDR
+
/* Define to 1 if you have the `initgroups' function. */
#undef HAVE_INITGROUPS
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
+ case "$OS" in
+ freebsd|netbsd) SUDO_LIBS="${SUDO_LIBS} -lutil"
+ ;;
+ esac
+
fi
done
#include <sys/types.h>
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
-# include <time.h>
-#else
-# include <sys/time.h>
#endif
+#include <time.h>
typedef struct timespec ac__type_new_;
int
fi
+{ echo "$as_me:$LINENO: checking for struct in6_addr" >&5
+echo $ECHO_N "checking for struct in6_addr... $ECHO_C" >&6; }
+if test "${ac_cv_type_struct_in6_addr+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <netinet/in.h>
+
+typedef struct in6_addr ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+ return 0;
+if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_struct_in6_addr=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_struct_in6_addr=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_struct_in6_addr" >&5
+echo "${ECHO_T}$ac_cv_type_struct_in6_addr" >&6; }
+if test $ac_cv_type_struct_in6_addr = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_IN6_ADDR 1
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_IN6_ADDR 1
+_ACEOF
+
+fi
+
{ echo "$as_me:$LINENO: checking for size_t" >&5
echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
if test "${sudo_cv_type_size_t+set}" = set; then
LIBS="$_LIBS"
fi
-if test ${with_logincap-'no'} = "yes"; then
- case "$OS" in
- freebsd|netbsd) SUDO_LIBS="${SUDO_LIBS} -lutil"
- ;;
- esac
-fi
-
if test ${with_AFS-'no'} = "yes"; then
# looks like the "standard" place for AFS libs is /usr/afsws/lib
+
+
dnl
dnl Process this file with GNU autoconf to produce a configure script.
-dnl $Sudo: configure.in,v 1.413.2.24 2007/10/09 00:06:05 millert Exp $
+dnl $Sudo: configure.in,v 1.413.2.27 2007/10/24 16:43:25 millert Exp $
dnl
dnl Copyright (c) 1994-1996,1998-2007 Todd C. Miller <Todd.Miller@courtesan.com>
dnl
fi
fi
if test ${with_logincap-'no'} != "no"; then
- AC_CHECK_HEADERS(login_cap.h)
+ AC_CHECK_HEADERS(login_cap.h, [
+ case "$OS" in
+ freebsd|netbsd) SUDO_LIBS="${SUDO_LIBS} -lutil"
+ ;;
+ esac
+ ])
fi
if test ${with_project-'no'} != "no"; then
AC_CHECK_HEADER(project.h, AC_DEFINE(HAVE_PROJECT_H)
AC_CHECK_TYPE([struct timespec], [AC_DEFINE(HAVE_TIMESPEC)], [], [#include <sys/types.h>
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
-# include <time.h>
-#else
-# include <sys/time.h>
-#endif])
+#endif
+#include <time.h>])
+AC_CHECK_TYPES([struct in6_addr], [AC_DEFINE(HAVE_IN6_ADDR)], [], [#include <sys/types.h>
+#include <netinet/in.h>])
SUDO_TYPE_SIZE_T
SUDO_TYPE_SSIZE_T
SUDO_TYPE_DEV_T
LIBS="$_LIBS"
fi
-dnl
-dnl Some systems put login_cap(3) in libutil
-dnl
-if test ${with_logincap-'no'} = "yes"; then
- case "$OS" in
- freebsd|netbsd) SUDO_LIBS="${SUDO_LIBS} -lutil"
- ;;
- esac
-fi
-
dnl
dnl extra AFS libs and includes
dnl
AH_TEMPLATE(HAVE_GETSPNAM, [Define to 1 if you have the `getspnam' function (SVR4-style shadow passwords)])
AH_TEMPLATE(HAVE_GETSPWUID, [Define to 1 if you have the `getspwuid' function. (HP-UX <= 9.X shadow passwords)])
AH_TEMPLATE(HAVE_HEIMDAL, [Define to 1 if your Kerberos is Heimdal.])
+AH_TEMPLATE(HAVE_IN6_ADDR, [Define to 1 if <netinet/in.h> contains struct in6_addr.])
AH_TEMPLATE(HAVE_ISCOMSEC, [Define to 1 if you have the `iscomsec' function. (HP-UX >= 10.x check for shadow enabled)])
AH_TEMPLATE(HAVE_ISSECURE, [Define to 1 if you have the `issecure' function. (SunOS 4.x check for shadow enabled)])
AH_TEMPLATE(HAVE_KERB4, [Define to 1 if you use Kerberos IV.])
#include "interfaces.h"
#ifndef lint
-__unused static const char rcsid[] = "$Sudo: interfaces.c,v 1.72.2.6 2007/08/14 15:19:25 millert Exp $";
+__unused static const char rcsid[] = "$Sudo: interfaces.c,v 1.72.2.7 2007/10/24 16:43:26 millert Exp $";
#endif /* lint */
{
struct ifaddrs *ifa, *ifaddrs;
struct sockaddr_in *sin;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
struct sockaddr_in6 *sin6;
#endif
int i;
switch(ifa->ifa_addr->sa_family) {
case AF_INET:
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
case AF_INET6:
#endif
num_interfaces++;
interfaces[i].family = AF_INET;
i++;
break;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
case AF_INET6:
sin6 = (struct sockaddr_in6 *)ifa->ifa_addr;
memcpy(&interfaces[i].addr, &sin6->sin6_addr,
interfaces[i].family = AF_INET6;
i++;
break;
-#endif /* AF_INET6 */
+#endif /* HAVE_IN6_ADDR */
}
}
#ifdef HAVE_FREEIFADDRS
dump_interfaces()
{
int i;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
char addrbuf[INET6_ADDRSTRLEN], maskbuf[INET6_ADDRSTRLEN];
#endif
printf("\t%s / ", inet_ntoa(interfaces[i].addr.ip4));
puts(inet_ntoa(interfaces[i].netmask.ip4));
break;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
case AF_INET6:
inet_ntop(AF_INET6, &interfaces[i].addr.ip6,
addrbuf, sizeof(addrbuf));
maskbuf, sizeof(maskbuf));
printf("\t%s / %s\n", addrbuf, maskbuf);
break;
-#endif /* AF_INET6 */
+#endif /* HAVE_IN6_ADDR */
}
}
}
* Agency (DARPA) and Air Force Research Laboratory, Air Force
* Materiel Command, USAF, under agreement number F39502-99-1-0512.
*
- * $Sudo: interfaces.h,v 1.8.2.2 2007/08/13 16:30:02 millert Exp $
+ * $Sudo: interfaces.h,v 1.8.2.3 2007/10/24 16:43:27 millert Exp $
*/
#ifndef _SUDO_INTERFACES_H
int family; /* AF_INET or AF_INET6 */
union {
struct in_addr ip4;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
struct in6_addr ip6;
#endif
} addr;
union {
struct in_addr ip4;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
struct in6_addr ip6;
#endif
} netmask;
#endif /* HAVE_EXTENDED_GLOB */
#ifndef lint
-__unused static const char rcsid[] = "$Sudo: parse.c,v 1.160.2.13 2007/08/25 02:37:11 millert Exp $";
+__unused static const char rcsid[] = "$Sudo: parse.c,v 1.160.2.14 2007/10/24 16:43:27 millert Exp $";
#endif /* lint */
/*
int i;
struct in_addr addr;
struct interface *ifp;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
struct in6_addr addr6;
int j;
#endif
int family;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
if (inet_pton(AF_INET6, n, &addr6) > 0) {
family = AF_INET6;
} else
== addr.s_addr)
return(TRUE);
break;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
case AF_INET6:
if (memcmp(ifp->addr.ip6.s6_addr, addr6.s6_addr,
sizeof(addr6.s6_addr)) == 0)
}
if (j == sizeof(addr6.s6_addr))
return(TRUE);
-#endif /* AF_INET6 */
+#endif /* HAVE_IN6_ADDR */
}
}
int i;
struct in_addr addr, mask;
struct interface *ifp;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
struct in6_addr addr6, mask6;
int j;
#endif
int family;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
if (inet_pton(AF_INET6, n, &addr6) > 0)
family = AF_INET6;
else
mask.s_addr = htonl(mask.s_addr);
}
}
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
else {
if (inet_pton(AF_INET6, m, &mask6) <= 0) {
j = atoi(m);
}
}
}
-#endif /* AF_INET6 */
+#endif /* HAVE_IN6_ADDR */
for (i = 0; i < num_interfaces; i++) {
ifp = &interfaces[i];
case AF_INET:
if ((ifp->addr.ip4.s_addr & mask.s_addr) == addr.s_addr)
return(TRUE);
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
case AF_INET6:
for (j = 0; j < sizeof(addr6.s6_addr); j++) {
if ((ifp->addr.ip6.s6_addr[j] & mask6.s6_addr[j]) != addr6.s6_addr[j])
}
if (j == sizeof(addr6.s6_addr))
return(TRUE);
-#endif /* AF_INET6 */
+#endif /* HAVE_IN6_ADDR */
}
}
#endif /* HAVE_LSEARCH */
#ifndef lint
-__unused static const char rcsid[] = "$Sudo: parse.yacc,v 1.204.2.7 2007/09/13 23:06:51 millert Exp $";
+__unused static const char rcsid[] = "$Sudo: parse.yacc,v 1.204.2.8 2007/11/02 19:09:01 millert Exp $";
#endif /* lint */
/*
* then check against default runas user.
*/
if (runas_matches == UNSPEC) {
- runas_matches =
- userpw_matches(def_runas_default,
- *user_runas, runas_pw);
+ runas_matches = userpw_matches(def_runas_default,
+ *user_runas, runas_pw) ? TRUE : NOMATCH;
}
}
| RUNAS runaslist {
-1.6.9p6 October 9, 2007 1
+1.6.9p8 November 2, 2007 1
-1.6.9p6 October 9, 2007 2
+1.6.9p8 November 2, 2007 2
-1.6.9p6 October 9, 2007 3
+1.6.9p8 November 2, 2007 3
-1.6.9p6 October 9, 2007 4
+1.6.9p8 November 2, 2007 4
-1.6.9p6 October 9, 2007 5
+1.6.9p8 November 2, 2007 5
-1.6.9p6 October 9, 2007 6
+1.6.9p8 November 2, 2007 6
-1.6.9p6 October 9, 2007 7
+1.6.9p8 November 2, 2007 7
-1.6.9p6 October 9, 2007 8
+1.6.9p8 November 2, 2007 8
-1.6.9p6 October 9, 2007 9
+1.6.9p8 November 2, 2007 9
.\" Agency (DARPA) and Air Force Research Laboratory, Air Force
.\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
.\"
-.\" $Sudo: sudo.man.in,v 1.29.2.13 2007/10/09 13:30:47 millert Exp $
+.\" $Sudo: sudo.man.in,v 1.29.2.15 2007/11/02 19:15:16 millert Exp $
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
.\"
.IX Title "SUDO @mansectsu@"
-.TH SUDO @mansectsu@ "October 9, 2007" "1.6.9p6" "MAINTENANCE COMMANDS"
+.TH SUDO @mansectsu@ "November 2, 2007" "1.6.9p8" "MAINTENANCE COMMANDS"
.SH "NAME"
sudo, sudoedit \- execute a command as another user
.SH "SYNOPSIS"
#if __GNUC__ >= 2
__attribute__ ((unused))
#endif /* __GNUC__ >= 2 */
- = "$OpenBSD: skeleton.c,v 1.26 2006/04/20 16:51:32 deraadt Exp $";
+ = "$OpenBSD: skeleton.c,v 1.28 2007/09/03 21:14:58 deraadt Exp $";
#endif
#include <stdlib.h>
#define YYBYACC 1
# include <unistd.h>
#endif /* HAVE_UNISTD_H */
#include <pwd.h>
-#if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
-# include <malloc.h>
-#endif /* HAVE_MALLOC_H && !STDC_HEADERS */
#if defined(YYBISON) && defined(HAVE_ALLOCA_H) && !defined(__GNUC__)
# include <alloca.h>
#endif /* YYBISON && HAVE_ALLOCA_H && !__GNUC__ */
#endif /* HAVE_LSEARCH */
#ifndef lint
-__unused static const char rcsid[] = "$Sudo: sudo.tab.c,v 1.76.2.6 2007/08/13 16:30:47 millert Exp $";
+__unused static const char rcsid[] = "$Sudo: sudo.tab.c,v 1.76.2.7 2007/11/02 19:09:22 millert Exp $";
#endif /* lint */
/*
static void expand_ga_list __P((void));
static void expand_match_list __P((void));
static aliasinfo *find_alias __P((char *, int));
-static int more_aliases __P((void));
+static void more_aliases __P((void));
void init_parser __P((void));
void yyerror __P((char *));
}
parse_error = TRUE;
}
-#line 224 "parse.yacc"
+#line 221 "parse.yacc"
#ifndef YYSTYPE_DEFINED
#define YYSTYPE_DEFINED
typedef union {
int tok;
} YYSTYPE;
#endif /* YYSTYPE_DEFINED */
-#line 251 "sudo.tab.c"
+#line 248 "sudo.tab.c"
#define COMMAND 257
#define ALIAS 258
#define DEFVAR 259
short *yysslim;
YYSTYPE *yyvs;
int yystacksize;
-#line 909 "parse.yacc"
+#line 905 "parse.yacc"
#define MOREALIASES (32)
aliasinfo *aliases = NULL;
size_t onaliases;
char s[512];
- if (naliases >= nslots && !more_aliases()) {
- (void) snprintf(s, sizeof(s), "Out of memory defining alias `%s'",
- alias);
- yyerror(s);
- return(FALSE);
- }
+ if (naliases >= nslots)
+ more_aliases();
ai.type = type;
ai.val = val;
/*
* Allocates more space for the aliases list.
*/
-static int
+static void
more_aliases()
{
nslots += MOREALIASES;
- if (nslots == MOREALIASES)
- aliases = (aliasinfo *) malloc(nslots * sizeof(aliasinfo));
- else
- aliases = (aliasinfo *) realloc(aliases, nslots * sizeof(aliasinfo));
-
- return(aliases != NULL);
+ aliases = (aliasinfo *) erealloc3(aliases, nslots, sizeof(aliasinfo));
}
/*
if (printmatches == TRUE)
expand_match_list();
}
-#line 991 "sudo.tab.c"
+#line 979 "sudo.tab.c"
/* allocate initial stack or double stack size, up to YYMAXDEPTH */
#if defined(__cplusplus) || defined(__STDC__)
static int yygrowstack(void)
else if ((newsize *= 2) > YYMAXDEPTH)
newsize = YYMAXDEPTH;
i = yyssp - yyss;
+#ifdef SIZE_MAX
+#define YY_SIZE_MAX SIZE_MAX
+#else
+#define YY_SIZE_MAX 0xffffffffU
+#endif
+ if (newsize && YY_SIZE_MAX / newsize < sizeof *newss)
+ goto bail;
newss = yyss ? (short *)realloc(yyss, newsize * sizeof *newss) :
- (short *)malloc(newsize * sizeof *newss);
+ (short *)malloc(newsize * sizeof *newss); /* overflow check above */
if (newss == NULL)
goto bail;
yyss = newss;
yyssp = newss + i;
+ if (newsize && YY_SIZE_MAX / newsize < sizeof *newvs)
+ goto bail;
newvs = yyvs ? (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs) :
- (YYSTYPE *)malloc(newsize * sizeof *newvs);
+ (YYSTYPE *)malloc(newsize * sizeof *newvs); /* overflow check above */
if (newvs == NULL)
goto bail;
yyvs = newvs;
switch (yyn)
{
case 3:
-#line 280 "parse.yacc"
+#line 277 "parse.yacc"
{ ; }
break;
case 4:
-#line 282 "parse.yacc"
+#line 279 "parse.yacc"
{ yyerrok; }
break;
case 5:
-#line 283 "parse.yacc"
+#line 280 "parse.yacc"
{ push; }
break;
case 6:
-#line 283 "parse.yacc"
+#line 280 "parse.yacc"
{
while (top && user_matches != TRUE)
pop;
}
break;
case 7:
-#line 288 "parse.yacc"
+#line 285 "parse.yacc"
{ ; }
break;
case 8:
-#line 290 "parse.yacc"
+#line 287 "parse.yacc"
{ ; }
break;
case 9:
-#line 292 "parse.yacc"
+#line 289 "parse.yacc"
{ ; }
break;
case 10:
-#line 294 "parse.yacc"
+#line 291 "parse.yacc"
{ ; }
break;
case 11:
-#line 296 "parse.yacc"
+#line 293 "parse.yacc"
{ ; }
break;
case 13:
-#line 302 "parse.yacc"
+#line 299 "parse.yacc"
{
defaults_matches = TRUE;
}
break;
case 14:
-#line 305 "parse.yacc"
+#line 302 "parse.yacc"
{ push; }
break;
case 15:
-#line 305 "parse.yacc"
+#line 302 "parse.yacc"
{
defaults_matches = user_matches;
pop;
}
break;
case 16:
-#line 309 "parse.yacc"
+#line 306 "parse.yacc"
{ push; }
break;
case 17:
-#line 309 "parse.yacc"
+#line 306 "parse.yacc"
{
defaults_matches = yyvsp[0].BOOLEAN == TRUE;
pop;
}
break;
case 18:
-#line 313 "parse.yacc"
+#line 310 "parse.yacc"
{ push; }
break;
case 19:
-#line 313 "parse.yacc"
+#line 310 "parse.yacc"
{
defaults_matches = host_matches;
pop;
}
break;
case 22:
-#line 323 "parse.yacc"
+#line 320 "parse.yacc"
{
if (defaults_matches == TRUE &&
!set_default(yyvsp[0].string, NULL, TRUE)) {
}
break;
case 23:
-#line 331 "parse.yacc"
+#line 328 "parse.yacc"
{
if (defaults_matches == TRUE &&
!set_default(yyvsp[0].string, NULL, FALSE)) {
}
break;
case 24:
-#line 339 "parse.yacc"
+#line 336 "parse.yacc"
{
if (defaults_matches == TRUE &&
!set_default(yyvsp[-2].string, yyvsp[0].string, TRUE)) {
}
break;
case 25:
-#line 348 "parse.yacc"
+#line 345 "parse.yacc"
{
if (defaults_matches == TRUE &&
!set_default(yyvsp[-2].string, yyvsp[0].string, '+')) {
}
break;
case 26:
-#line 357 "parse.yacc"
+#line 354 "parse.yacc"
{
if (defaults_matches == TRUE &&
!set_default(yyvsp[-2].string, yyvsp[0].string, '-')) {
}
break;
case 29:
-#line 372 "parse.yacc"
+#line 369 "parse.yacc"
{
/*
* We already did a push if necessary in
}
break;
case 30:
-#line 386 "parse.yacc"
+#line 383 "parse.yacc"
{
SETMATCH(host_matches, yyvsp[0].BOOLEAN);
}
break;
case 31:
-#line 389 "parse.yacc"
+#line 386 "parse.yacc"
{
SETNMATCH(host_matches, yyvsp[0].BOOLEAN);
}
break;
case 32:
-#line 394 "parse.yacc"
+#line 391 "parse.yacc"
{
yyval.BOOLEAN = TRUE;
}
break;
case 33:
-#line 397 "parse.yacc"
+#line 394 "parse.yacc"
{
if (addr_matches(yyvsp[0].string))
yyval.BOOLEAN = TRUE;
}
break;
case 34:
-#line 404 "parse.yacc"
+#line 401 "parse.yacc"
{
if (netgr_matches(yyvsp[0].string, user_host, user_shost, NULL))
yyval.BOOLEAN = TRUE;
}
break;
case 35:
-#line 411 "parse.yacc"
+#line 408 "parse.yacc"
{
if (hostname_matches(user_shost, user_host, yyvsp[0].string) == 0)
yyval.BOOLEAN = TRUE;
}
break;
case 36:
-#line 418 "parse.yacc"
+#line 415 "parse.yacc"
{
aliasinfo *aip = find_alias(yyvsp[0].string, HOST_ALIAS);
}
break;
case 39:
-#line 446 "parse.yacc"
+#line 443 "parse.yacc"
{
/*
* Push the entry onto the stack if it is worth
}
break;
case 40:
-#line 475 "parse.yacc"
+#line 472 "parse.yacc"
{
SETMATCH(cmnd_matches, yyvsp[0].BOOLEAN);
}
break;
case 41:
-#line 478 "parse.yacc"
+#line 475 "parse.yacc"
{
if (printmatches == TRUE) {
if (in_alias == TRUE)
}
break;
case 42:
-#line 486 "parse.yacc"
+#line 483 "parse.yacc"
{
SETNMATCH(cmnd_matches, yyvsp[0].BOOLEAN);
}
break;
case 43:
-#line 491 "parse.yacc"
+#line 488 "parse.yacc"
{
if (printmatches == TRUE && host_matches == TRUE &&
user_matches == TRUE) {
* then check against default runas user.
*/
if (runas_matches == UNSPEC) {
- runas_matches =
- userpw_matches(def_runas_default,
- *user_runas, runas_pw);
+ runas_matches = userpw_matches(def_runas_default,
+ *user_runas, runas_pw) ? TRUE : NOMATCH;
}
}
break;
case 44:
-#line 516 "parse.yacc"
+#line 512 "parse.yacc"
{
runas_matches = yyvsp[0].BOOLEAN;
}
break;
case 45:
-#line 521 "parse.yacc"
+#line 517 "parse.yacc"
{ ; }
break;
case 46:
-#line 522 "parse.yacc"
+#line 518 "parse.yacc"
{
/* Later entries override earlier ones. */
if (yyvsp[0].BOOLEAN != NOMATCH)
}
break;
case 47:
-#line 531 "parse.yacc"
+#line 527 "parse.yacc"
{ ; }
break;
case 48:
-#line 532 "parse.yacc"
+#line 528 "parse.yacc"
{
if (printmatches == TRUE) {
if (in_alias == TRUE)
}
break;
case 49:
-#line 540 "parse.yacc"
+#line 536 "parse.yacc"
{
/* Set $$ to the negation of runasuser */
yyval.BOOLEAN = (yyvsp[0].BOOLEAN == NOMATCH ? NOMATCH : ! yyvsp[0].BOOLEAN);
}
break;
case 50:
-#line 546 "parse.yacc"
+#line 542 "parse.yacc"
{
if (printmatches == TRUE) {
if (in_alias == TRUE)
}
break;
case 51:
-#line 561 "parse.yacc"
+#line 557 "parse.yacc"
{
if (printmatches == TRUE) {
if (in_alias == TRUE)
}
break;
case 52:
-#line 576 "parse.yacc"
+#line 572 "parse.yacc"
{
if (printmatches == TRUE) {
if (in_alias == TRUE)
}
break;
case 53:
-#line 591 "parse.yacc"
+#line 587 "parse.yacc"
{
aliasinfo *aip = find_alias(yyvsp[0].string, RUNAS_ALIAS);
}
break;
case 54:
-#line 621 "parse.yacc"
+#line 617 "parse.yacc"
{
if (printmatches == TRUE) {
if (in_alias == TRUE)
}
break;
case 55:
-#line 633 "parse.yacc"
+#line 629 "parse.yacc"
{
/* Inherit {NO,}{PASSWD,EXEC,SETENV} status. */
if (printmatches == TRUE && host_matches == TRUE &&
}
break;
case 56:
-#line 651 "parse.yacc"
+#line 647 "parse.yacc"
{
no_passwd = TRUE;
if (printmatches == TRUE && host_matches == TRUE &&
}
break;
case 57:
-#line 657 "parse.yacc"
+#line 653 "parse.yacc"
{
no_passwd = FALSE;
if (printmatches == TRUE && host_matches == TRUE &&
}
break;
case 58:
-#line 663 "parse.yacc"
+#line 659 "parse.yacc"
{
no_execve = TRUE;
if (printmatches == TRUE && host_matches == TRUE &&
}
break;
case 59:
-#line 669 "parse.yacc"
+#line 665 "parse.yacc"
{
no_execve = FALSE;
if (printmatches == TRUE && host_matches == TRUE &&
}
break;
case 60:
-#line 675 "parse.yacc"
+#line 671 "parse.yacc"
{
setenv_ok = TRUE;
if (printmatches == TRUE && host_matches == TRUE &&
}
break;
case 61:
-#line 681 "parse.yacc"
+#line 677 "parse.yacc"
{
setenv_ok = FALSE;
if (printmatches == TRUE && host_matches == TRUE &&
}
break;
case 62:
-#line 689 "parse.yacc"
+#line 685 "parse.yacc"
{
if (printmatches == TRUE) {
if (in_alias == TRUE)
}
break;
case 63:
-#line 704 "parse.yacc"
+#line 700 "parse.yacc"
{
aliasinfo *aip;
}
break;
case 64:
-#line 733 "parse.yacc"
+#line 729 "parse.yacc"
{
if (printmatches == TRUE) {
if (in_alias == TRUE) {
}
break;
case 67:
-#line 763 "parse.yacc"
+#line 759 "parse.yacc"
{ push; }
break;
case 68:
-#line 763 "parse.yacc"
+#line 759 "parse.yacc"
{
if ((MATCHED(host_matches) || pedantic) &&
!add_alias(yyvsp[-3].string, HOST_ALIAS, host_matches)) {
}
break;
case 73:
-#line 781 "parse.yacc"
+#line 777 "parse.yacc"
{
push;
if (printmatches == TRUE) {
}
break;
case 74:
-#line 790 "parse.yacc"
+#line 786 "parse.yacc"
{
if ((MATCHED(cmnd_matches) || pedantic) &&
!add_alias(yyvsp[-3].string, CMND_ALIAS, cmnd_matches)) {
}
break;
case 75:
-#line 804 "parse.yacc"
+#line 800 "parse.yacc"
{ ; }
break;
case 79:
-#line 812 "parse.yacc"
+#line 808 "parse.yacc"
{
if (printmatches == TRUE) {
in_alias = TRUE;
}
break;
case 80:
-#line 820 "parse.yacc"
+#line 816 "parse.yacc"
{
if ((yyvsp[0].BOOLEAN != NOMATCH || pedantic) &&
!add_alias(yyvsp[-3].string, RUNAS_ALIAS, yyvsp[0].BOOLEAN)) {
}
break;
case 83:
-#line 837 "parse.yacc"
+#line 833 "parse.yacc"
{ push; }
break;
case 84:
-#line 837 "parse.yacc"
+#line 833 "parse.yacc"
{
if ((MATCHED(user_matches) || pedantic) &&
!add_alias(yyvsp[-3].string, USER_ALIAS, user_matches)) {
}
break;
case 87:
-#line 852 "parse.yacc"
+#line 848 "parse.yacc"
{
SETMATCH(user_matches, yyvsp[0].BOOLEAN);
}
break;
case 88:
-#line 855 "parse.yacc"
+#line 851 "parse.yacc"
{
SETNMATCH(user_matches, yyvsp[0].BOOLEAN);
}
break;
case 89:
-#line 860 "parse.yacc"
+#line 856 "parse.yacc"
{
if (userpw_matches(yyvsp[0].string, user_name, sudo_user.pw))
yyval.BOOLEAN = TRUE;
}
break;
case 90:
-#line 867 "parse.yacc"
+#line 863 "parse.yacc"
{
if (usergr_matches(yyvsp[0].string, user_name, sudo_user.pw))
yyval.BOOLEAN = TRUE;
}
break;
case 91:
-#line 874 "parse.yacc"
+#line 870 "parse.yacc"
{
if (netgr_matches(yyvsp[0].string, NULL, NULL, user_name))
yyval.BOOLEAN = TRUE;
}
break;
case 92:
-#line 881 "parse.yacc"
+#line 877 "parse.yacc"
{
aliasinfo *aip = find_alias(yyvsp[0].string, USER_ALIAS);
}
break;
case 93:
-#line 903 "parse.yacc"
+#line 899 "parse.yacc"
{
yyval.BOOLEAN = TRUE;
}
break;
-#line 1947 "sudo.tab.c"
+#line 1943 "sudo.tab.c"
}
yyssp -= yym;
yystate = *yyssp;
-1.6.9p6 October 9, 2007 1
+1.6.9p8 November 2, 2007 1
-1.6.9p6 October 9, 2007 2
+1.6.9p8 November 2, 2007 2
-1.6.9p6 October 9, 2007 3
+1.6.9p8 November 2, 2007 3
-1.6.9p6 October 9, 2007 4
+1.6.9p8 November 2, 2007 4
-1.6.9p6 October 9, 2007 5
+1.6.9p8 November 2, 2007 5
-1.6.9p6 October 9, 2007 6
+1.6.9p8 November 2, 2007 6
-1.6.9p6 October 9, 2007 7
+1.6.9p8 November 2, 2007 7
-1.6.9p6 October 9, 2007 8
+1.6.9p8 November 2, 2007 8
-1.6.9p6 October 9, 2007 9
+1.6.9p8 November 2, 2007 9
-1.6.9p6 October 9, 2007 10
+1.6.9p8 November 2, 2007 10
-1.6.9p6 October 9, 2007 11
+1.6.9p8 November 2, 2007 11
-1.6.9p6 October 9, 2007 12
+1.6.9p8 November 2, 2007 12
-1.6.9p6 October 9, 2007 13
+1.6.9p8 November 2, 2007 13
-1.6.9p6 October 9, 2007 14
+1.6.9p8 November 2, 2007 14
-1.6.9p6 October 9, 2007 15
+1.6.9p8 November 2, 2007 15
-1.6.9p6 October 9, 2007 16
+1.6.9p8 November 2, 2007 16
-1.6.9p6 October 9, 2007 17
+1.6.9p8 November 2, 2007 17
-1.6.9p6 October 9, 2007 18
+1.6.9p8 November 2, 2007 18
-1.6.9p6 October 9, 2007 19
+1.6.9p8 November 2, 2007 19
-1.6.9p6 October 9, 2007 20
+1.6.9p8 November 2, 2007 20
-1.6.9p6 October 9, 2007 21
+1.6.9p8 November 2, 2007 21
-1.6.9p6 October 9, 2007 22
+1.6.9p8 November 2, 2007 22
-1.6.9p6 October 9, 2007 23
+1.6.9p8 November 2, 2007 23
-1.6.9p6 October 9, 2007 24
+1.6.9p8 November 2, 2007 24
.\" Agency (DARPA) and Air Force Research Laboratory, Air Force
.\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
.\"
-.\" $Sudo: sudoers.man.in,v 1.45.2.15 2007/10/09 13:30:47 millert Exp $
+.\" $Sudo: sudoers.man.in,v 1.45.2.17 2007/11/02 19:15:16 millert Exp $
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
.\"
.IX Title "SUDOERS @mansectform@"
-.TH SUDOERS @mansectform@ "October 9, 2007" "1.6.9p6" "MAINTENANCE COMMANDS"
+.TH SUDOERS @mansectform@ "November 2, 2007" "1.6.9p8" "MAINTENANCE COMMANDS"
.SH "NAME"
sudoers \- list of which users may execute what
.SH "DESCRIPTION"
#endif /* HAVE_FNMATCH */
#ifndef lint
-__unused static const char rcsid[] = "$Sudo: testsudoers.c,v 1.88.2.5 2007/08/25 02:45:09 millert Exp $";
+__unused static const char rcsid[] = "$Sudo: testsudoers.c,v 1.88.2.6 2007/10/24 16:43:27 millert Exp $";
#endif /* lint */
int i;
struct in_addr addr;
struct interface *ifp;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
struct in6_addr addr6;
int j;
#endif
int family;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
if (inet_pton(AF_INET6, n, &addr6) > 0) {
family = AF_INET6;
} else
== addr.s_addr)
return(TRUE);
break;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
case AF_INET6:
if (memcmp(ifp->addr.ip6.s6_addr, addr6.s6_addr,
sizeof(addr6.s6_addr)) == 0)
}
if (j == sizeof(addr6.s6_addr))
return(TRUE);
-#endif /* AF_INET6 */
+#endif /* HAVE_IN6_ADDR */
}
}
int i;
struct in_addr addr, mask;
struct interface *ifp;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
struct in6_addr addr6, mask6;
int j;
#endif
int family;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
if (inet_pton(AF_INET6, n, &addr6) > 0)
family = AF_INET6;
else
mask.s_addr = htonl(mask.s_addr);
}
}
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
else {
if (inet_pton(AF_INET6, m, &mask6) <= 0) {
j = atoi(m);
}
}
}
-#endif /* AF_INET6 */
+#endif /* HAVE_IN6_ADDR */
for (i = 0; i < num_interfaces; i++) {
ifp = &interfaces[i];
case AF_INET:
if ((ifp->addr.ip4.s_addr & mask.s_addr) == addr.s_addr)
return(TRUE);
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
case AF_INET6:
for (j = 0; j < sizeof(addr6.s6_addr); j++) {
if ((ifp->addr.ip6.s6_addr[j] & mask6.s6_addr[j]) != addr6.s6_addr[j])
}
if (j == sizeof(addr6.s6_addr))
return(TRUE);
-#endif /* AF_INET6 */
+#endif /* HAVE_IN6_ADDR */
}
}
#include "sudo.h"
#ifndef lint
-__unused static const char rcsid[] = "$Sudo: tgetpass.c,v 1.111.2.4 2007/10/08 16:01:10 millert Exp $";
+__unused static const char rcsid[] = "$Sudo: tgetpass.c,v 1.111.2.5 2007/10/17 15:39:43 millert Exp $";
#endif /* lint */
#ifndef TCSASOFT
#endif
/*
- * Abstract method of getting at the term flags.
+ * QNX 6 (at least) has issues with TCSAFLUSH.
*/
-#undef TERM
-#undef tflags
-#ifdef HAVE_TERMIOS_H
-# define TERM termios
-# define tflags c_lflag
-# define term_getattr(f, t) tcgetattr(f, t)
-# define term_setattr(f, t) tcsetattr(f, TCSADRAIN|TCSASOFT, t)
-#else
+#ifdef __QNX__
+#undef TCSAFLUSH
+#define TCSAFLUSH TCSADRAIN
+#endif
+
+/*
+ * Compat macros for non-termios systems.
+ */
+#ifndef HAVE_TERMIOS_H
# ifdef HAVE_TERMIO_H
-# define TERM termio
-# define tflags c_lflag
-# define term_getattr(f, t) ioctl(f, TCGETA, t)
-# define term_setattr(f, t) ioctl(f, TCSETAF, t)
+# undef termios
+# define termios termio
+# define tcgetattr(f, t) ioctl(f, TCGETA, t)
+# define tcsetattr(f, a, t) ioctl(f, a, t)
+# undef TCSAFLUSH
+# define TCSAFLUSH TCSETAF
+# undef TCSANOW
+# define TCSANOW TCSETA
# else
-# define TERM sgttyb
-# define tflags sg_flags
-# define term_getattr(f, t) ioctl(f, TIOCGETP, t)
-# define term_setattr(f, t) ioctl(f, TIOCSETP, t)
+# undef termios
+# define termios sgttyb
+# define c_lflag sg_flags
+# define tcgetattr(f, t) ioctl(f, TIOCGETP, t)
+# define tcsetattr(f, a, t) ioctl(f, a, t)
+# undef TCSAFLUSH
+# define TCSAFLUSH TIOCSETP
+# undef TCSANOW
+# define TCSANOW TIOCSETN
# endif /* HAVE_TERMIO_H */
#endif /* HAVE_TERMIOS_H */
{
sigaction_t sa, savealrm, saveint, savehup, savequit, saveterm;
sigaction_t savetstp, savettin, savettou;
- struct TERM term, oterm;
+ struct termios term, oterm;
char *pass;
static char buf[SUDO_PASS_MAX + 1];
int input, output, save_errno;
(void) sigaction(SIGTTOU, &sa, &savettou);
/* Turn echo off/on as specified by flags. */
- if (term_getattr(input, &oterm) == 0) {
+ if (tcgetattr(input, &oterm) == 0) {
(void) memcpy(&term, &oterm, sizeof(term));
if (!ISSET(flags, TGP_ECHO))
- CLR(term.tflags, (ECHO | ECHONL));
+ CLR(term.c_lflag, ECHO|ECHONL);
#ifdef VSTATUS
term.c_cc[VSTATUS] = _POSIX_VDISABLE;
#endif
- (void) term_setattr(input, &term);
+ (void) tcsetattr(input, TCSAFLUSH|TCSASOFT, &term);
} else {
memset(&term, 0, sizeof(term));
memset(&oterm, 0, sizeof(oterm));
alarm(0);
save_errno = errno;
- if (!ISSET(term.tflags, ECHO))
+ if (!ISSET(term.c_lflag, ECHO))
(void) write(output, "\n", 1);
}
/* Restore old tty settings and signals. */
- if (memcmp(&term, &oterm, sizeof(term)) != 0)
- (void) term_setattr(input, &oterm);
+ if (memcmp(&term, &oterm, sizeof(term)) != 0) {
+ while (tcsetattr(input, TCSANOW|TCSASOFT, &oterm) == -1 &&
+ errno == EINTR)
+ continue;
+ }
(void) sigaction(SIGALRM, &savealrm, NULL);
(void) sigaction(SIGINT, &saveint, NULL);
(void) sigaction(SIGHUP, &savehup, NULL);
* Agency (DARPA) and Air Force Research Laboratory, Air Force
* Materiel Command, USAF, under agreement number F39502-99-1-0512.
*
- * $Sudo: version.h,v 1.66.2.9 2007/10/09 13:29:20 millert Exp $
+ * $Sudo: version.h,v 1.66.2.11 2007/11/02 19:15:16 millert Exp $
*/
#ifndef _SUDO_VERSION_H
#define _SUDO_VERSION_H
-static const char version[] = "1.6.9p6";
+static const char version[] = "1.6.9p8";
#endif /* _SUDO_VERSION_H */
-1.6.9p6 October 9, 2007 1
+1.6.9p8 November 2, 2007 1
-1.6.9p6 October 9, 2007 2
+1.6.9p8 November 2, 2007 2
-1.6.9p6 October 9, 2007 3
+1.6.9p8 November 2, 2007 3
.\" Agency (DARPA) and Air Force Research Laboratory, Air Force
.\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
.\"
-.\" $Sudo: visudo.man.in,v 1.20.2.11 2007/10/09 13:30:48 millert Exp $
+.\" $Sudo: visudo.man.in,v 1.20.2.13 2007/11/02 19:15:16 millert Exp $
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
.\"
.IX Title "VISUDO @mansectsu@"
-.TH VISUDO @mansectsu@ "October 9, 2007" "1.6.9p6" "MAINTENANCE COMMANDS"
+.TH VISUDO @mansectsu@ "November 2, 2007" "1.6.9p8" "MAINTENANCE COMMANDS"
.SH "NAME"
visudo \- edit the sudoers file
.SH "SYNOPSIS"