Use sys/stat.h defines instead of bare octal values.

This commit is contained in:
Todd C. Miller
2016-11-07 13:36:05 -07:00
parent 2b020c9f17
commit 8133cdfdf6
12 changed files with 43 additions and 23 deletions

View File

@@ -17,6 +17,7 @@
#include <config.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
@@ -49,7 +50,7 @@ sudo_strtomode_v1(const char *cp, const char **errstr)
errno = EINVAL;
debug_return_int(0);
}
if (lval < 0 || lval > 0777) {
if (lval < 0 || lval > ACCESSPERMS) {
if (errstr != NULL)
*errstr = lval < 0 ? N_("value too small") : N_("value too large");
errno = ERANGE;