Remove trailing spaces, no actual code changes.
This commit is contained in:
10
ldap.c
10
ldap.c
@@ -551,7 +551,7 @@ sudo_ldap_read_config()
|
|||||||
/*
|
/*
|
||||||
like perl's join(sep,@ARGS)
|
like perl's join(sep,@ARGS)
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
_ldap_join_values(sep,v)
|
_ldap_join_values(sep,v)
|
||||||
char *sep;
|
char *sep;
|
||||||
char **v;
|
char **v;
|
||||||
@@ -584,7 +584,7 @@ size_t sudo_ldap_cm_list_size;
|
|||||||
* Walks through search result and returns true if we have a
|
* Walks through search result and returns true if we have a
|
||||||
* command match
|
* command match
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
sudo_ldap_add_match(ld,entry)
|
sudo_ldap_add_match(ld,entry)
|
||||||
LDAP *ld;
|
LDAP *ld;
|
||||||
LDAPMessage *entry;
|
LDAPMessage *entry;
|
||||||
@@ -595,7 +595,7 @@ sudo_ldap_add_match(ld,entry)
|
|||||||
|
|
||||||
/* if we are not collecting matches, then don't print them */
|
/* if we are not collecting matches, then don't print them */
|
||||||
if (printmatches != TRUE) return 1;
|
if (printmatches != TRUE) return 1;
|
||||||
|
|
||||||
/* collect the dn, only show the rdn */
|
/* collect the dn, only show the rdn */
|
||||||
dn=ldap_get_dn(ld,entry);
|
dn=ldap_get_dn(ld,entry);
|
||||||
edn=dn ? ldap_explode_dn(dn,1) : NULL;
|
edn=dn ? ldap_explode_dn(dn,1) : NULL;
|
||||||
@@ -827,7 +827,7 @@ int pwflag;
|
|||||||
if (pwflag && ldap_user_matches && ldap_host_matches){
|
if (pwflag && ldap_user_matches && ldap_host_matches){
|
||||||
/*
|
/*
|
||||||
* Handle verifypw & listpw
|
* Handle verifypw & listpw
|
||||||
*
|
*
|
||||||
* To be extra paranoid, since we haven't read any NOPASSWD options
|
* To be extra paranoid, since we haven't read any NOPASSWD options
|
||||||
* in /etc/sudoers yet, but we have to make the decission now, lets
|
* in /etc/sudoers yet, but we have to make the decission now, lets
|
||||||
* assume the worst and prefer to prompt for password unless the setting
|
* assume the worst and prefer to prompt for password unless the setting
|
||||||
@@ -850,7 +850,7 @@ int pwflag;
|
|||||||
/* Same logic with noexec */
|
/* Same logic with noexec */
|
||||||
if (def_noexec) SET(ret,FLAG_NOEXEC);
|
if (def_noexec) SET(ret,FLAG_NOEXEC);
|
||||||
} else {
|
} else {
|
||||||
/* we do not have a match */
|
/* we do not have a match */
|
||||||
ret=VALIDATE_NOT_OK;
|
ret=VALIDATE_NOT_OK;
|
||||||
if (!ldap_user_matches) SET(ret,FLAG_NO_USER);
|
if (!ldap_user_matches) SET(ret,FLAG_NO_USER);
|
||||||
else if (!ldap_host_matches) SET(ret,FLAG_NO_HOST);
|
else if (!ldap_host_matches) SET(ret,FLAG_NO_HOST);
|
||||||
|
@@ -38,13 +38,13 @@
|
|||||||
/*
|
/*
|
||||||
* Maximum number of characters to log per entry. The syslogger
|
* Maximum number of characters to log per entry. The syslogger
|
||||||
* will log this much, after that, it truncates the log line.
|
* will log this much, after that, it truncates the log line.
|
||||||
* We need this here to make sure that we continue with another
|
* We need this here to make sure that we continue with another
|
||||||
* syslog(3) call if the internal buffer is more than 1023 characters.
|
* syslog(3) call if the internal buffer is more than 1023 characters.
|
||||||
*/
|
*/
|
||||||
#ifndef MAXSYSLOGLEN
|
#ifndef MAXSYSLOGLEN
|
||||||
# define MAXSYSLOGLEN 960
|
# define MAXSYSLOGLEN 960
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void log_auth __P((int, int));
|
void log_auth __P((int, int));
|
||||||
void log_error __P((int flags, const char *fmt, ...));
|
void log_error __P((int flags, const char *fmt, ...));
|
||||||
RETSIGTYPE reapchild __P((int));
|
RETSIGTYPE reapchild __P((int));
|
||||||
|
4
parse.c
4
parse.c
@@ -480,7 +480,7 @@ usergr_matches(group, user, pw)
|
|||||||
return(FALSE);
|
return(FALSE);
|
||||||
pw_gid = pw->pw_gid;
|
pw_gid = pw->pw_gid;
|
||||||
|
|
||||||
if ((grp = getgrnam(group)) == NULL)
|
if ((grp = getgrnam(group)) == NULL)
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
|
|
||||||
/* check against user's primary (passwd file) gid */
|
/* check against user's primary (passwd file) gid */
|
||||||
@@ -548,7 +548,7 @@ has_meta(s)
|
|||||||
char *s;
|
char *s;
|
||||||
{
|
{
|
||||||
char *t;
|
char *t;
|
||||||
|
|
||||||
for (t = s; *t; t++) {
|
for (t = s; *t; t++) {
|
||||||
if (*t == '\\' || *t == '?' || *t == '*' || *t == '[' || *t == ']')
|
if (*t == '\\' || *t == '?' || *t == '*' || *t == '[' || *t == ']')
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
|
@@ -245,7 +245,7 @@ yyerror(s)
|
|||||||
%token <tok> ERROR
|
%token <tok> ERROR
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NOTE: these are not true booleans as there are actually 4 possible values:
|
* NOTE: these are not true booleans as there are actually 4 possible values:
|
||||||
* 1) TRUE (positive match)
|
* 1) TRUE (positive match)
|
||||||
* 0) FALSE (negative match due to a '!' somewhere)
|
* 0) FALSE (negative match due to a '!' somewhere)
|
||||||
* -1) NOMATCH (don't change the value of *_matches)
|
* -1) NOMATCH (don't change the value of *_matches)
|
||||||
@@ -1034,7 +1034,7 @@ dumpaliases()
|
|||||||
void
|
void
|
||||||
list_matches()
|
list_matches()
|
||||||
{
|
{
|
||||||
size_t count;
|
size_t count;
|
||||||
char *p;
|
char *p;
|
||||||
struct generic_alias *ga, key;
|
struct generic_alias *ga, key;
|
||||||
|
|
||||||
@@ -1219,8 +1219,8 @@ init_parser()
|
|||||||
match = NULL;
|
match = NULL;
|
||||||
top = 0;
|
top = 0;
|
||||||
parse_error = FALSE;
|
parse_error = FALSE;
|
||||||
errorlineno = -1;
|
errorlineno = -1;
|
||||||
sudolineno = 1;
|
sudolineno = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate space for the matching stack. */
|
/* Allocate space for the matching stack. */
|
||||||
|
2
sudo.c
2
sudo.c
@@ -579,7 +579,7 @@ init_vars(sudo_mode)
|
|||||||
log_error(USE_ERRNO|MSG_ONLY, "can't get hostname");
|
log_error(USE_ERRNO|MSG_ONLY, "can't get hostname");
|
||||||
|
|
||||||
set_runaspw(*user_runas); /* may call log_error() */
|
set_runaspw(*user_runas); /* may call log_error() */
|
||||||
if (*user_runas[0] == '#' && runas_pw->pw_name && runas_pw->pw_name[0])
|
if (*user_runas[0] == '#' && runas_pw->pw_name && runas_pw->pw_name[0])
|
||||||
*user_runas = estrdup(runas_pw->pw_name);
|
*user_runas = estrdup(runas_pw->pw_name);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -108,7 +108,7 @@ has_meta(s)
|
|||||||
char *s;
|
char *s;
|
||||||
{
|
{
|
||||||
char *t;
|
char *t;
|
||||||
|
|
||||||
for (t = s; *t; t++) {
|
for (t = s; *t; t++) {
|
||||||
if (*t == '\\' || *t == '?' || *t == '*' || *t == '[' || *t == ']')
|
if (*t == '\\' || *t == '?' || *t == '*' || *t == '[' || *t == ']')
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
@@ -133,7 +133,7 @@ command_matches(cmnd, cmnd_args, path, sudoers_args)
|
|||||||
if (cmnd == NULL)
|
if (cmnd == NULL)
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
|
|
||||||
if ((args = strchr(path, ' ')))
|
if ((args = strchr(path, ' ')))
|
||||||
*args++ = '\0';
|
*args++ = '\0';
|
||||||
|
|
||||||
if (has_meta(path)) {
|
if (has_meta(path)) {
|
||||||
@@ -198,7 +198,7 @@ addr_matches(n)
|
|||||||
mask.s_addr <<= i;
|
mask.s_addr <<= i;
|
||||||
mask.s_addr = htonl(mask.s_addr);
|
mask.s_addr = htonl(mask.s_addr);
|
||||||
}
|
}
|
||||||
*(m - 1) = '/';
|
*(m - 1) = '/';
|
||||||
|
|
||||||
for (i = 0; i < num_interfaces; i++)
|
for (i = 0; i < num_interfaces; i++)
|
||||||
if ((interfaces[i].addr.s_addr & mask.s_addr) == addr.s_addr)
|
if ((interfaces[i].addr.s_addr & mask.s_addr) == addr.s_addr)
|
||||||
@@ -222,8 +222,8 @@ hostname_matches(shost, lhost, pattern)
|
|||||||
char *lhost;
|
char *lhost;
|
||||||
char *pattern;
|
char *pattern;
|
||||||
{
|
{
|
||||||
if (has_meta(pattern)) {
|
if (has_meta(pattern)) {
|
||||||
if (strchr(pattern, '.'))
|
if (strchr(pattern, '.'))
|
||||||
return(fnmatch(pattern, lhost, FNM_CASEFOLD));
|
return(fnmatch(pattern, lhost, FNM_CASEFOLD));
|
||||||
else
|
else
|
||||||
return(fnmatch(pattern, shost, FNM_CASEFOLD));
|
return(fnmatch(pattern, shost, FNM_CASEFOLD));
|
||||||
@@ -262,7 +262,7 @@ usergr_matches(group, user, pw)
|
|||||||
if (*group++ != '%')
|
if (*group++ != '%')
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
|
|
||||||
if ((grp = getgrnam(group)) == NULL)
|
if ((grp = getgrnam(group)) == NULL)
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -331,12 +331,12 @@ set_fqdn()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
set_runaspw(user)
|
set_runaspw(user)
|
||||||
char *user;
|
char *user;
|
||||||
{
|
{
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
init_envtables()
|
init_envtables()
|
||||||
|
Reference in New Issue
Block a user