From: Todd C. Miller Date: Sun, 6 Jun 2004 23:58:11 +0000 (+0000) Subject: Remove trailing spaces, no actual code changes. X-Git-Tag: SUDO_1_6_8~69 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=713e419fe9aec52755fd5671a6587ca2c64556e9;p=sudo Remove trailing spaces, no actual code changes. --- diff --git a/ldap.c b/ldap.c index 40c6634a6..cb874c5de 100644 --- a/ldap.c +++ b/ldap.c @@ -551,7 +551,7 @@ sudo_ldap_read_config() /* like perl's join(sep,@ARGS) */ -char * +char * _ldap_join_values(sep,v) char *sep; char **v; @@ -584,7 +584,7 @@ size_t sudo_ldap_cm_list_size; * Walks through search result and returns true if we have a * command match */ -int +int sudo_ldap_add_match(ld,entry) LDAP *ld; LDAPMessage *entry; @@ -595,7 +595,7 @@ sudo_ldap_add_match(ld,entry) /* if we are not collecting matches, then don't print them */ if (printmatches != TRUE) return 1; - + /* collect the dn, only show the rdn */ dn=ldap_get_dn(ld,entry); edn=dn ? ldap_explode_dn(dn,1) : NULL; @@ -827,7 +827,7 @@ int pwflag; if (pwflag && ldap_user_matches && ldap_host_matches){ /* * Handle verifypw & listpw - * + * * 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 * assume the worst and prefer to prompt for password unless the setting @@ -850,7 +850,7 @@ int pwflag; /* Same logic with noexec */ if (def_noexec) SET(ret,FLAG_NOEXEC); } else { - /* we do not have a match */ + /* we do not have a match */ ret=VALIDATE_NOT_OK; if (!ldap_user_matches) SET(ret,FLAG_NO_USER); else if (!ldap_host_matches) SET(ret,FLAG_NO_HOST); diff --git a/logging.h b/logging.h index e084b84b6..2fec8ae7a 100644 --- a/logging.h +++ b/logging.h @@ -38,13 +38,13 @@ /* * Maximum number of characters to log per entry. The syslogger * 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. */ #ifndef MAXSYSLOGLEN # define MAXSYSLOGLEN 960 #endif - + void log_auth __P((int, int)); void log_error __P((int flags, const char *fmt, ...)); RETSIGTYPE reapchild __P((int)); diff --git a/parse.c b/parse.c index f8659a915..94439077c 100644 --- a/parse.c +++ b/parse.c @@ -480,7 +480,7 @@ usergr_matches(group, user, pw) return(FALSE); pw_gid = pw->pw_gid; - if ((grp = getgrnam(group)) == NULL) + if ((grp = getgrnam(group)) == NULL) return(FALSE); /* check against user's primary (passwd file) gid */ @@ -548,7 +548,7 @@ has_meta(s) char *s; { char *t; - + for (t = s; *t; t++) { if (*t == '\\' || *t == '?' || *t == '*' || *t == '[' || *t == ']') return(TRUE); diff --git a/parse.yacc b/parse.yacc index 481b9ee04..4d1c940ac 100644 --- a/parse.yacc +++ b/parse.yacc @@ -245,7 +245,7 @@ yyerror(s) %token 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) * 0) FALSE (negative match due to a '!' somewhere) * -1) NOMATCH (don't change the value of *_matches) @@ -1034,7 +1034,7 @@ dumpaliases() void list_matches() { - size_t count; + size_t count; char *p; struct generic_alias *ga, key; @@ -1219,8 +1219,8 @@ init_parser() match = NULL; top = 0; parse_error = FALSE; - errorlineno = -1; - sudolineno = 1; + errorlineno = -1; + sudolineno = 1; } /* Allocate space for the matching stack. */ diff --git a/sudo.c b/sudo.c index c22c928aa..1281c92df 100644 --- a/sudo.c +++ b/sudo.c @@ -579,7 +579,7 @@ init_vars(sudo_mode) log_error(USE_ERRNO|MSG_ONLY, "can't get hostname"); 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); /* diff --git a/testsudoers.c b/testsudoers.c index 72067a077..66c2e07df 100644 --- a/testsudoers.c +++ b/testsudoers.c @@ -108,7 +108,7 @@ has_meta(s) char *s; { char *t; - + for (t = s; *t; t++) { if (*t == '\\' || *t == '?' || *t == '*' || *t == '[' || *t == ']') return(TRUE); @@ -133,7 +133,7 @@ command_matches(cmnd, cmnd_args, path, sudoers_args) if (cmnd == NULL) return(FALSE); - if ((args = strchr(path, ' '))) + if ((args = strchr(path, ' '))) *args++ = '\0'; if (has_meta(path)) { @@ -198,7 +198,7 @@ addr_matches(n) mask.s_addr <<= i; mask.s_addr = htonl(mask.s_addr); } - *(m - 1) = '/'; + *(m - 1) = '/'; for (i = 0; i < num_interfaces; i++) if ((interfaces[i].addr.s_addr & mask.s_addr) == addr.s_addr) @@ -222,8 +222,8 @@ hostname_matches(shost, lhost, pattern) char *lhost; char *pattern; { - if (has_meta(pattern)) { - if (strchr(pattern, '.')) + if (has_meta(pattern)) { + if (strchr(pattern, '.')) return(fnmatch(pattern, lhost, FNM_CASEFOLD)); else return(fnmatch(pattern, shost, FNM_CASEFOLD)); @@ -262,7 +262,7 @@ usergr_matches(group, user, pw) if (*group++ != '%') return(FALSE); - if ((grp = getgrnam(group)) == NULL) + if ((grp = getgrnam(group)) == NULL) return(FALSE); /* @@ -331,12 +331,12 @@ set_fqdn() return; } -int +int set_runaspw(user) char *user; { return(TRUE); -} +} void init_envtables()