include strcasecmp() for those without it
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -1161,3 +1161,5 @@ Sudo 1.5.9 released.
|
|||||||
stored with the contents. This could lead to incorrect output
|
stored with the contents. This could lead to incorrect output
|
||||||
if the sudoers file had different alias types with the same name.
|
if the sudoers file had different alias types with the same name.
|
||||||
Normal parsing (ie: not in '-l' mode) is unaffected.
|
Normal parsing (ie: not in '-l' mode) is unaffected.
|
||||||
|
|
||||||
|
365) Now include strcasecmp() for those without it.
|
||||||
|
6
LICENSE
6
LICENSE
@@ -35,11 +35,11 @@ Sudo is distributed under the following BSD-style license:
|
|||||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Additionally, lsearch.c, fnmatch.c, getcwd.c, snprintf.c and fnmatch.3 bear
|
Additionally, lsearch.c, fnmatch.c, getcwd.c, snprintf.c, strcasecmp.c
|
||||||
the following UCB license:
|
and fnmatch.3 bear the following UCB license:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1989, 1990, 1991, 1993, 1994
|
* Copyright (c) 1987, 1989, 1990, 1991, 1993, 1994
|
||||||
* The Regents of the University of California. All rights reserved.
|
* The Regents of the University of California. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
@@ -111,9 +111,9 @@ PROGS = @PROGS@
|
|||||||
|
|
||||||
SRCS = alloc.c alloca.c check.c fileops.c find_path.c fnmatch.c getcwd.c \
|
SRCS = alloc.c alloca.c check.c fileops.c find_path.c fnmatch.c getcwd.c \
|
||||||
getspwuid.c goodpath.c interfaces.c lex.yy.c lsearch.c logging.c \
|
getspwuid.c goodpath.c interfaces.c lex.yy.c lsearch.c logging.c \
|
||||||
parse.c parse.lex parse.yacc putenv.c snprintf.c strerror.c sudo.c \
|
parse.c parse.lex parse.yacc putenv.c snprintf.c strcasecmp.c \
|
||||||
sudo.tab.c sudo_setenv.c testsudoers.c tgetpass.c utime.c version.c \
|
strerror.c sudo.c sudo.tab.c sudo_setenv.c testsudoers.c tgetpass.c \
|
||||||
visudo.c $(AUTH_SRCS)
|
utime.c version.c visudo.c $(AUTH_SRCS)
|
||||||
|
|
||||||
AUTH_SRCS = auth/afs.c auth/aix_auth.c auth/dce.c auth/fwtk.c auth/kerb4.c \
|
AUTH_SRCS = auth/afs.c auth/aix_auth.c auth/dce.c auth/fwtk.c auth/kerb4.c \
|
||||||
auth/kerb5.c auth/pam.c auth/passwd.c auth/rfc1938.c \
|
auth/kerb5.c auth/pam.c auth/passwd.c auth/rfc1938.c \
|
||||||
@@ -211,6 +211,7 @@ getcwd.o: getcwd.c config.h compat.h
|
|||||||
lsearch.o: lsearch.c config.h compat.h emul/search.h
|
lsearch.o: lsearch.c config.h compat.h emul/search.h
|
||||||
putenv.o: putenv.c config.h compat.h
|
putenv.o: putenv.c config.h compat.h
|
||||||
snprintf.o: snprintf.c config.h compat.h
|
snprintf.o: snprintf.c config.h compat.h
|
||||||
|
strcasecmp.o: strcasecmp.c config.h
|
||||||
strerror.o: strerror.c config.h
|
strerror.o: strerror.c config.h
|
||||||
utime.o: utime.c config.h pathnames.h compat.h emul/utime.h
|
utime.o: utime.c config.h pathnames.h compat.h emul/utime.h
|
||||||
|
|
||||||
|
4
configure
vendored
4
configure
vendored
@@ -5480,7 +5480,7 @@ EOF
|
|||||||
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
for ac_func in strchr strrchr memchr memcpy memset sysconf sigaction tzset strcasecmp seteuid ftruncate
|
for ac_func in strchr strrchr memchr memcpy memset sysconf sigaction tzset seteuid ftruncate
|
||||||
do
|
do
|
||||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||||
echo "configure:5487: checking for $ac_func" >&5
|
echo "configure:5487: checking for $ac_func" >&5
|
||||||
@@ -6444,7 +6444,7 @@ else
|
|||||||
LIBOBJS="$LIBOBJS fnmatch.o"
|
LIBOBJS="$LIBOBJS fnmatch.o"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for ac_func in strerror
|
for ac_func in strerror strcasecmp
|
||||||
do
|
do
|
||||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||||
echo "configure:6451: checking for $ac_func" >&5
|
echo "configure:6451: checking for $ac_func" >&5
|
||||||
|
@@ -1405,7 +1405,7 @@ esac
|
|||||||
dnl
|
dnl
|
||||||
dnl Function checks
|
dnl Function checks
|
||||||
dnl
|
dnl
|
||||||
AC_CHECK_FUNCS(strchr strrchr memchr memcpy memset sysconf sigaction tzset strcasecmp seteuid ftruncate)
|
AC_CHECK_FUNCS(strchr strrchr memchr memcpy memset sysconf sigaction tzset seteuid ftruncate)
|
||||||
if test -n "$SECUREWARE"; then
|
if test -n "$SECUREWARE"; then
|
||||||
AC_CHECK_FUNCS(bigcrypt)
|
AC_CHECK_FUNCS(bigcrypt)
|
||||||
AC_CHECK_FUNCS(set_auth_parameters)
|
AC_CHECK_FUNCS(set_auth_parameters)
|
||||||
@@ -1422,7 +1422,7 @@ AC_CHECK_FUNC(setenv, AC_DEFINE(HAVE_SETENV), AC_FUNC_CHECK(putenv, AC_DEFINE(HA
|
|||||||
AC_CHECK_FUNC(utime, AC_DEFINE(HAVE_UTIME)
|
AC_CHECK_FUNC(utime, AC_DEFINE(HAVE_UTIME)
|
||||||
SUDO_FUNC_UTIME_POSIX, LIBOBJS="$LIBOBJS utime.o")
|
SUDO_FUNC_UTIME_POSIX, LIBOBJS="$LIBOBJS utime.o")
|
||||||
SUDO_FUNC_FNMATCH(AC_DEFINE(HAVE_FNMATCH), LIBOBJS="$LIBOBJS fnmatch.o")
|
SUDO_FUNC_FNMATCH(AC_DEFINE(HAVE_FNMATCH), LIBOBJS="$LIBOBJS fnmatch.o")
|
||||||
AC_REPLACE_FUNCS(strerror)
|
AC_REPLACE_FUNCS(strerror strcasecmp)
|
||||||
AC_CHECK_FUNC(snprintf, AC_DEFINE(HAVE_SNPRINTF), NEED_SNPRINTF=1)
|
AC_CHECK_FUNC(snprintf, AC_DEFINE(HAVE_SNPRINTF), NEED_SNPRINTF=1)
|
||||||
AC_CHECK_FUNC(vsnprintf, AC_DEFINE(HAVE_VSNPRINTF), NEED_SNPRINTF=1)
|
AC_CHECK_FUNC(vsnprintf, AC_DEFINE(HAVE_VSNPRINTF), NEED_SNPRINTF=1)
|
||||||
AC_CHECK_FUNC(asprintf, AC_DEFINE(HAVE_ASPRINTF), NEED_SNPRINTF=1)
|
AC_CHECK_FUNC(asprintf, AC_DEFINE(HAVE_ASPRINTF), NEED_SNPRINTF=1)
|
||||||
|
@@ -75,10 +75,6 @@
|
|||||||
#include "emul/search.h"
|
#include "emul/search.h"
|
||||||
#endif /* HAVE_LSEARCH */
|
#endif /* HAVE_LSEARCH */
|
||||||
|
|
||||||
#ifndef HAVE_STRCASECMP
|
|
||||||
#define strcasecmp(a,b) strcmp(a,b)
|
|
||||||
#endif /* !HAVE_STRCASECMP */
|
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static const char rcsid[] = "$Sudo$";
|
static const char rcsid[] = "$Sudo$";
|
||||||
#endif /* lint */
|
#endif /* lint */
|
||||||
|
115
strcasecmp.c
Normal file
115
strcasecmp.c
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 1987, 1993
|
||||||
|
* The Regents of the University of California. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* 3. All advertising materials mentioning features or use of this software
|
||||||
|
* must display the following acknowledgement:
|
||||||
|
* This product includes software developed by the University of
|
||||||
|
* California, Berkeley and its contributors.
|
||||||
|
* 4. Neither the name of the University nor the names of its contributors
|
||||||
|
* may be used to endorse or promote products derived from this software
|
||||||
|
* without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||||
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
* SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* @(#)strcasecmp.c 8.1 (Berkeley) 6/4/93
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#ifndef lint
|
||||||
|
static const char rcsid[] = "$Sudo$";
|
||||||
|
#endif /* lint */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This array is designed for mapping upper and lower case letter
|
||||||
|
* together for a case independent comparison. The mappings are
|
||||||
|
* based upon ascii character sequences.
|
||||||
|
*/
|
||||||
|
static const unsigned char charmap[] = {
|
||||||
|
'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
|
||||||
|
'\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
|
||||||
|
'\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
|
||||||
|
'\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
|
||||||
|
'\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
|
||||||
|
'\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
|
||||||
|
'\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
|
||||||
|
'\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
|
||||||
|
'\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
|
||||||
|
'\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
|
||||||
|
'\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
|
||||||
|
'\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
|
||||||
|
'\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
|
||||||
|
'\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
|
||||||
|
'\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
|
||||||
|
'\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
|
||||||
|
'\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
|
||||||
|
'\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
|
||||||
|
'\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
|
||||||
|
'\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
|
||||||
|
'\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
|
||||||
|
'\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
|
||||||
|
'\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
|
||||||
|
'\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
|
||||||
|
'\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307',
|
||||||
|
'\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317',
|
||||||
|
'\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327',
|
||||||
|
'\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337',
|
||||||
|
'\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
|
||||||
|
'\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
|
||||||
|
'\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
|
||||||
|
'\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
|
||||||
|
};
|
||||||
|
|
||||||
|
int
|
||||||
|
strcasecmp(s1, s2)
|
||||||
|
const char *s1, *s2;
|
||||||
|
{
|
||||||
|
const unsigned char *cm = charmap,
|
||||||
|
*us1 = (const unsigned char *)s1,
|
||||||
|
*us2 = (const unsigned char *)s2;
|
||||||
|
|
||||||
|
while (cm[*us1] == cm[*us2++])
|
||||||
|
if (*us1++ == '\0')
|
||||||
|
return (0);
|
||||||
|
return (cm[*us1] - cm[*--us2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
strncasecmp(s1, s2, n)
|
||||||
|
const char *s1, *s2;
|
||||||
|
size_t n;
|
||||||
|
{
|
||||||
|
|
||||||
|
if (n != 0) {
|
||||||
|
const unsigned char *cm = charmap,
|
||||||
|
*us1 = (const unsigned char *)s1,
|
||||||
|
*us2 = (const unsigned char *)s2;
|
||||||
|
|
||||||
|
do {
|
||||||
|
if (cm[*us1] != cm[*us2++])
|
||||||
|
return (cm[*us1] - cm[*--us2]);
|
||||||
|
if (*us1++ == '\0')
|
||||||
|
break;
|
||||||
|
} while (--n != 0);
|
||||||
|
}
|
||||||
|
return (0);
|
||||||
|
}
|
122
sudo.tab.c
122
sudo.tab.c
@@ -93,10 +93,6 @@ static char yyrcsid[]
|
|||||||
#include "emul/search.h"
|
#include "emul/search.h"
|
||||||
#endif /* HAVE_LSEARCH */
|
#endif /* HAVE_LSEARCH */
|
||||||
|
|
||||||
#ifndef HAVE_STRCASECMP
|
|
||||||
#define strcasecmp(a,b) strcmp(a,b)
|
|
||||||
#endif /* !HAVE_STRCASECMP */
|
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static const char rcsid[] = "$Sudo$";
|
static const char rcsid[] = "$Sudo$";
|
||||||
#endif /* lint */
|
#endif /* lint */
|
||||||
@@ -224,14 +220,14 @@ yyerror(s)
|
|||||||
}
|
}
|
||||||
parse_error = TRUE;
|
parse_error = TRUE;
|
||||||
}
|
}
|
||||||
#line 211 "./parse.yacc"
|
#line 207 "./parse.yacc"
|
||||||
typedef union {
|
typedef union {
|
||||||
char *string;
|
char *string;
|
||||||
int BOOLEAN;
|
int BOOLEAN;
|
||||||
struct sudo_command command;
|
struct sudo_command command;
|
||||||
int tok;
|
int tok;
|
||||||
} YYSTYPE;
|
} YYSTYPE;
|
||||||
#line 235 "sudo.tab.c"
|
#line 231 "sudo.tab.c"
|
||||||
#define COMMAND 257
|
#define COMMAND 257
|
||||||
#define ALIAS 258
|
#define ALIAS 258
|
||||||
#define NTWKADDR 259
|
#define NTWKADDR 259
|
||||||
@@ -536,7 +532,7 @@ short *yyss;
|
|||||||
short *yysslim;
|
short *yysslim;
|
||||||
YYSTYPE *yyvs;
|
YYSTYPE *yyvs;
|
||||||
int yystacksize;
|
int yystacksize;
|
||||||
#line 769 "./parse.yacc"
|
#line 765 "./parse.yacc"
|
||||||
|
|
||||||
#define MOREALIASES (32)
|
#define MOREALIASES (32)
|
||||||
aliasinfo *aliases = NULL;
|
aliasinfo *aliases = NULL;
|
||||||
@@ -886,7 +882,7 @@ init_parser()
|
|||||||
if (printmatches == TRUE)
|
if (printmatches == TRUE)
|
||||||
expand_match_list();
|
expand_match_list();
|
||||||
}
|
}
|
||||||
#line 890 "sudo.tab.c"
|
#line 886 "sudo.tab.c"
|
||||||
/* allocate initial stack or double stack size, up to YYMAXDEPTH */
|
/* allocate initial stack or double stack size, up to YYMAXDEPTH */
|
||||||
#if defined(__cplusplus) || __STDC__
|
#if defined(__cplusplus) || __STDC__
|
||||||
static int yygrowstack(void)
|
static int yygrowstack(void)
|
||||||
@@ -1067,42 +1063,42 @@ yyreduce:
|
|||||||
switch (yyn)
|
switch (yyn)
|
||||||
{
|
{
|
||||||
case 3:
|
case 3:
|
||||||
#line 256 "./parse.yacc"
|
#line 252 "./parse.yacc"
|
||||||
{ ; }
|
{ ; }
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
#line 258 "./parse.yacc"
|
#line 254 "./parse.yacc"
|
||||||
{ yyerrok; }
|
{ yyerrok; }
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
#line 259 "./parse.yacc"
|
#line 255 "./parse.yacc"
|
||||||
{ push; }
|
{ push; }
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
#line 259 "./parse.yacc"
|
#line 255 "./parse.yacc"
|
||||||
{
|
{
|
||||||
while (top && user_matches != TRUE)
|
while (top && user_matches != TRUE)
|
||||||
pop;
|
pop;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
#line 264 "./parse.yacc"
|
#line 260 "./parse.yacc"
|
||||||
{ ; }
|
{ ; }
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
#line 266 "./parse.yacc"
|
#line 262 "./parse.yacc"
|
||||||
{ ; }
|
{ ; }
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
#line 268 "./parse.yacc"
|
#line 264 "./parse.yacc"
|
||||||
{ ; }
|
{ ; }
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
#line 270 "./parse.yacc"
|
#line 266 "./parse.yacc"
|
||||||
{ ; }
|
{ ; }
|
||||||
break;
|
break;
|
||||||
case 13:
|
case 13:
|
||||||
#line 278 "./parse.yacc"
|
#line 274 "./parse.yacc"
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* We already did a push if necessary in
|
* We already did a push if necessary in
|
||||||
@@ -1115,27 +1111,27 @@ case 13:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 14:
|
case 14:
|
||||||
#line 290 "./parse.yacc"
|
#line 286 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if (yyvsp[0].BOOLEAN != -1)
|
if (yyvsp[0].BOOLEAN != -1)
|
||||||
host_matches = yyvsp[0].BOOLEAN;
|
host_matches = yyvsp[0].BOOLEAN;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 15:
|
case 15:
|
||||||
#line 294 "./parse.yacc"
|
#line 290 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if (yyvsp[0].BOOLEAN != -1)
|
if (yyvsp[0].BOOLEAN != -1)
|
||||||
host_matches = ! yyvsp[0].BOOLEAN;
|
host_matches = ! yyvsp[0].BOOLEAN;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 16:
|
case 16:
|
||||||
#line 299 "./parse.yacc"
|
#line 295 "./parse.yacc"
|
||||||
{
|
{
|
||||||
yyval.BOOLEAN = TRUE;
|
yyval.BOOLEAN = TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 17:
|
case 17:
|
||||||
#line 302 "./parse.yacc"
|
#line 298 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if (addr_matches(yyvsp[0].string))
|
if (addr_matches(yyvsp[0].string))
|
||||||
yyval.BOOLEAN = TRUE;
|
yyval.BOOLEAN = TRUE;
|
||||||
@@ -1145,7 +1141,7 @@ case 17:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 18:
|
case 18:
|
||||||
#line 309 "./parse.yacc"
|
#line 305 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if (netgr_matches(yyvsp[0].string, user_host, NULL))
|
if (netgr_matches(yyvsp[0].string, user_host, NULL))
|
||||||
yyval.BOOLEAN = TRUE;
|
yyval.BOOLEAN = TRUE;
|
||||||
@@ -1155,7 +1151,7 @@ case 18:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 19:
|
case 19:
|
||||||
#line 316 "./parse.yacc"
|
#line 312 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if (strcasecmp(user_shost, yyvsp[0].string) == 0)
|
if (strcasecmp(user_shost, yyvsp[0].string) == 0)
|
||||||
yyval.BOOLEAN = TRUE;
|
yyval.BOOLEAN = TRUE;
|
||||||
@@ -1165,7 +1161,7 @@ case 19:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 20:
|
case 20:
|
||||||
#line 323 "./parse.yacc"
|
#line 319 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if (strcasecmp(user_host, yyvsp[0].string) == 0)
|
if (strcasecmp(user_host, yyvsp[0].string) == 0)
|
||||||
yyval.BOOLEAN = TRUE;
|
yyval.BOOLEAN = TRUE;
|
||||||
@@ -1175,7 +1171,7 @@ case 20:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 21:
|
case 21:
|
||||||
#line 330 "./parse.yacc"
|
#line 326 "./parse.yacc"
|
||||||
{
|
{
|
||||||
aliasinfo *aip = find_alias(yyvsp[0].string, HOST_ALIAS);
|
aliasinfo *aip = find_alias(yyvsp[0].string, HOST_ALIAS);
|
||||||
|
|
||||||
@@ -1200,7 +1196,7 @@ case 21:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 24:
|
case 24:
|
||||||
#line 358 "./parse.yacc"
|
#line 354 "./parse.yacc"
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Push the entry onto the stack if it is worth
|
* Push the entry onto the stack if it is worth
|
||||||
@@ -1223,14 +1219,14 @@ case 24:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 25:
|
case 25:
|
||||||
#line 380 "./parse.yacc"
|
#line 376 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if (yyvsp[0].BOOLEAN != -1)
|
if (yyvsp[0].BOOLEAN != -1)
|
||||||
cmnd_matches = yyvsp[0].BOOLEAN;
|
cmnd_matches = yyvsp[0].BOOLEAN;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 26:
|
case 26:
|
||||||
#line 384 "./parse.yacc"
|
#line 380 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if (printmatches == TRUE) {
|
if (printmatches == TRUE) {
|
||||||
if (in_alias == TRUE)
|
if (in_alias == TRUE)
|
||||||
@@ -1242,14 +1238,14 @@ case 26:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 27:
|
case 27:
|
||||||
#line 392 "./parse.yacc"
|
#line 388 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if (yyvsp[0].BOOLEAN != -1)
|
if (yyvsp[0].BOOLEAN != -1)
|
||||||
cmnd_matches = ! yyvsp[0].BOOLEAN;
|
cmnd_matches = ! yyvsp[0].BOOLEAN;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 28:
|
case 28:
|
||||||
#line 398 "./parse.yacc"
|
#line 394 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if (printmatches == TRUE && host_matches == TRUE &&
|
if (printmatches == TRUE && host_matches == TRUE &&
|
||||||
user_matches == TRUE) {
|
user_matches == TRUE) {
|
||||||
@@ -1275,18 +1271,18 @@ case 28:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 29:
|
case 29:
|
||||||
#line 421 "./parse.yacc"
|
#line 417 "./parse.yacc"
|
||||||
{ ; }
|
{ ; }
|
||||||
break;
|
break;
|
||||||
case 32:
|
case 32:
|
||||||
#line 428 "./parse.yacc"
|
#line 424 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if (yyvsp[0].BOOLEAN != -1)
|
if (yyvsp[0].BOOLEAN != -1)
|
||||||
runas_matches = yyvsp[0].BOOLEAN;
|
runas_matches = yyvsp[0].BOOLEAN;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 33:
|
case 33:
|
||||||
#line 432 "./parse.yacc"
|
#line 428 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if (printmatches == TRUE) {
|
if (printmatches == TRUE) {
|
||||||
if (in_alias == TRUE)
|
if (in_alias == TRUE)
|
||||||
@@ -1298,14 +1294,14 @@ case 33:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 34:
|
case 34:
|
||||||
#line 440 "./parse.yacc"
|
#line 436 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if (yyvsp[0].BOOLEAN != -1)
|
if (yyvsp[0].BOOLEAN != -1)
|
||||||
runas_matches = ! yyvsp[0].BOOLEAN;
|
runas_matches = ! yyvsp[0].BOOLEAN;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 35:
|
case 35:
|
||||||
#line 445 "./parse.yacc"
|
#line 441 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if (printmatches == TRUE) {
|
if (printmatches == TRUE) {
|
||||||
if (in_alias == TRUE)
|
if (in_alias == TRUE)
|
||||||
@@ -1322,7 +1318,7 @@ case 35:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 36:
|
case 36:
|
||||||
#line 459 "./parse.yacc"
|
#line 455 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if (printmatches == TRUE) {
|
if (printmatches == TRUE) {
|
||||||
if (in_alias == TRUE)
|
if (in_alias == TRUE)
|
||||||
@@ -1339,7 +1335,7 @@ case 36:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 37:
|
case 37:
|
||||||
#line 473 "./parse.yacc"
|
#line 469 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if (printmatches == TRUE) {
|
if (printmatches == TRUE) {
|
||||||
if (in_alias == TRUE)
|
if (in_alias == TRUE)
|
||||||
@@ -1356,7 +1352,7 @@ case 37:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 38:
|
case 38:
|
||||||
#line 487 "./parse.yacc"
|
#line 483 "./parse.yacc"
|
||||||
{
|
{
|
||||||
aliasinfo *aip = find_alias(yyvsp[0].string, RUNAS_ALIAS);
|
aliasinfo *aip = find_alias(yyvsp[0].string, RUNAS_ALIAS);
|
||||||
|
|
||||||
@@ -1388,7 +1384,7 @@ case 38:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 39:
|
case 39:
|
||||||
#line 516 "./parse.yacc"
|
#line 512 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if (printmatches == TRUE) {
|
if (printmatches == TRUE) {
|
||||||
if (in_alias == TRUE)
|
if (in_alias == TRUE)
|
||||||
@@ -1401,7 +1397,7 @@ case 39:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 40:
|
case 40:
|
||||||
#line 528 "./parse.yacc"
|
#line 524 "./parse.yacc"
|
||||||
{
|
{
|
||||||
/* Inherit NOPASSWD/PASSWD status. */
|
/* Inherit NOPASSWD/PASSWD status. */
|
||||||
if (printmatches == TRUE && host_matches == TRUE &&
|
if (printmatches == TRUE && host_matches == TRUE &&
|
||||||
@@ -1414,7 +1410,7 @@ case 40:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 41:
|
case 41:
|
||||||
#line 538 "./parse.yacc"
|
#line 534 "./parse.yacc"
|
||||||
{
|
{
|
||||||
no_passwd = TRUE;
|
no_passwd = TRUE;
|
||||||
if (printmatches == TRUE && host_matches == TRUE &&
|
if (printmatches == TRUE && host_matches == TRUE &&
|
||||||
@@ -1423,7 +1419,7 @@ case 41:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 42:
|
case 42:
|
||||||
#line 544 "./parse.yacc"
|
#line 540 "./parse.yacc"
|
||||||
{
|
{
|
||||||
no_passwd = FALSE;
|
no_passwd = FALSE;
|
||||||
if (printmatches == TRUE && host_matches == TRUE &&
|
if (printmatches == TRUE && host_matches == TRUE &&
|
||||||
@@ -1432,7 +1428,7 @@ case 42:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 43:
|
case 43:
|
||||||
#line 552 "./parse.yacc"
|
#line 548 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if (printmatches == TRUE) {
|
if (printmatches == TRUE) {
|
||||||
if (in_alias == TRUE)
|
if (in_alias == TRUE)
|
||||||
@@ -1452,7 +1448,7 @@ case 43:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 44:
|
case 44:
|
||||||
#line 569 "./parse.yacc"
|
#line 565 "./parse.yacc"
|
||||||
{
|
{
|
||||||
aliasinfo *aip;
|
aliasinfo *aip;
|
||||||
|
|
||||||
@@ -1484,7 +1480,7 @@ case 44:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 45:
|
case 45:
|
||||||
#line 598 "./parse.yacc"
|
#line 594 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if (printmatches == TRUE) {
|
if (printmatches == TRUE) {
|
||||||
if (in_alias == TRUE) {
|
if (in_alias == TRUE) {
|
||||||
@@ -1513,11 +1509,11 @@ case 45:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 48:
|
case 48:
|
||||||
#line 630 "./parse.yacc"
|
#line 626 "./parse.yacc"
|
||||||
{ push; }
|
{ push; }
|
||||||
break;
|
break;
|
||||||
case 49:
|
case 49:
|
||||||
#line 630 "./parse.yacc"
|
#line 626 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if ((host_matches != -1 || pedantic) &&
|
if ((host_matches != -1 || pedantic) &&
|
||||||
!add_alias(yyvsp[-3].string, HOST_ALIAS, host_matches))
|
!add_alias(yyvsp[-3].string, HOST_ALIAS, host_matches))
|
||||||
@@ -1526,7 +1522,7 @@ case 49:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 54:
|
case 54:
|
||||||
#line 646 "./parse.yacc"
|
#line 642 "./parse.yacc"
|
||||||
{
|
{
|
||||||
push;
|
push;
|
||||||
if (printmatches == TRUE) {
|
if (printmatches == TRUE) {
|
||||||
@@ -1539,7 +1535,7 @@ case 54:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 55:
|
case 55:
|
||||||
#line 655 "./parse.yacc"
|
#line 651 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if ((cmnd_matches != -1 || pedantic) &&
|
if ((cmnd_matches != -1 || pedantic) &&
|
||||||
!add_alias(yyvsp[-3].string, CMND_ALIAS, cmnd_matches))
|
!add_alias(yyvsp[-3].string, CMND_ALIAS, cmnd_matches))
|
||||||
@@ -1552,11 +1548,11 @@ case 55:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 56:
|
case 56:
|
||||||
#line 667 "./parse.yacc"
|
#line 663 "./parse.yacc"
|
||||||
{ ; }
|
{ ; }
|
||||||
break;
|
break;
|
||||||
case 60:
|
case 60:
|
||||||
#line 675 "./parse.yacc"
|
#line 671 "./parse.yacc"
|
||||||
{
|
{
|
||||||
push;
|
push;
|
||||||
if (printmatches == TRUE) {
|
if (printmatches == TRUE) {
|
||||||
@@ -1569,7 +1565,7 @@ case 60:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 61:
|
case 61:
|
||||||
#line 684 "./parse.yacc"
|
#line 680 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if ((runas_matches != -1 || pedantic) &&
|
if ((runas_matches != -1 || pedantic) &&
|
||||||
!add_alias(yyvsp[-3].string, RUNAS_ALIAS, runas_matches))
|
!add_alias(yyvsp[-3].string, RUNAS_ALIAS, runas_matches))
|
||||||
@@ -1582,11 +1578,11 @@ case 61:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 64:
|
case 64:
|
||||||
#line 700 "./parse.yacc"
|
#line 696 "./parse.yacc"
|
||||||
{ push; }
|
{ push; }
|
||||||
break;
|
break;
|
||||||
case 65:
|
case 65:
|
||||||
#line 700 "./parse.yacc"
|
#line 696 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if ((user_matches != -1 || pedantic) &&
|
if ((user_matches != -1 || pedantic) &&
|
||||||
!add_alias(yyvsp[-3].string, USER_ALIAS, user_matches))
|
!add_alias(yyvsp[-3].string, USER_ALIAS, user_matches))
|
||||||
@@ -1596,25 +1592,25 @@ case 65:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 66:
|
case 66:
|
||||||
#line 709 "./parse.yacc"
|
#line 705 "./parse.yacc"
|
||||||
{ ; }
|
{ ; }
|
||||||
break;
|
break;
|
||||||
case 68:
|
case 68:
|
||||||
#line 713 "./parse.yacc"
|
#line 709 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if (yyvsp[0].BOOLEAN != -1)
|
if (yyvsp[0].BOOLEAN != -1)
|
||||||
user_matches = yyvsp[0].BOOLEAN;
|
user_matches = yyvsp[0].BOOLEAN;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 69:
|
case 69:
|
||||||
#line 717 "./parse.yacc"
|
#line 713 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if (yyvsp[0].BOOLEAN != -1)
|
if (yyvsp[0].BOOLEAN != -1)
|
||||||
user_matches = ! yyvsp[0].BOOLEAN;
|
user_matches = ! yyvsp[0].BOOLEAN;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 70:
|
case 70:
|
||||||
#line 722 "./parse.yacc"
|
#line 718 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if (strcmp(yyvsp[0].string, user_name) == 0)
|
if (strcmp(yyvsp[0].string, user_name) == 0)
|
||||||
yyval.BOOLEAN = TRUE;
|
yyval.BOOLEAN = TRUE;
|
||||||
@@ -1624,7 +1620,7 @@ case 70:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 71:
|
case 71:
|
||||||
#line 729 "./parse.yacc"
|
#line 725 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if (usergr_matches(yyvsp[0].string, user_name))
|
if (usergr_matches(yyvsp[0].string, user_name))
|
||||||
yyval.BOOLEAN = TRUE;
|
yyval.BOOLEAN = TRUE;
|
||||||
@@ -1634,7 +1630,7 @@ case 71:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 72:
|
case 72:
|
||||||
#line 736 "./parse.yacc"
|
#line 732 "./parse.yacc"
|
||||||
{
|
{
|
||||||
if (netgr_matches(yyvsp[0].string, NULL, user_name))
|
if (netgr_matches(yyvsp[0].string, NULL, user_name))
|
||||||
yyval.BOOLEAN = TRUE;
|
yyval.BOOLEAN = TRUE;
|
||||||
@@ -1644,7 +1640,7 @@ case 72:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 73:
|
case 73:
|
||||||
#line 743 "./parse.yacc"
|
#line 739 "./parse.yacc"
|
||||||
{
|
{
|
||||||
aliasinfo *aip = find_alias(yyvsp[0].string, USER_ALIAS);
|
aliasinfo *aip = find_alias(yyvsp[0].string, USER_ALIAS);
|
||||||
|
|
||||||
@@ -1667,12 +1663,12 @@ case 73:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 74:
|
case 74:
|
||||||
#line 763 "./parse.yacc"
|
#line 759 "./parse.yacc"
|
||||||
{
|
{
|
||||||
yyval.BOOLEAN = TRUE;
|
yyval.BOOLEAN = TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#line 1676 "sudo.tab.c"
|
#line 1672 "sudo.tab.c"
|
||||||
}
|
}
|
||||||
yyssp -= yym;
|
yyssp -= yym;
|
||||||
yystate = *yyssp;
|
yystate = *yyssp;
|
||||||
|
Reference in New Issue
Block a user