mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-30 05:48:18 +00:00
Move LOGIN_NAME_MAX compat define to login_max.c
This commit is contained in:
parent
e3753309fe
commit
a3cd820d21
@ -30,6 +30,14 @@
|
||||
#include <sudo_compat.h>
|
||||
#include <sudo_util.h>
|
||||
|
||||
#ifndef LOGIN_NAME_MAX
|
||||
# ifdef _POSIX_LOGIN_NAME_MAX
|
||||
# define LOGIN_NAME_MAX _POSIX_LOGIN_NAME_MAX
|
||||
# else
|
||||
# define LOGIN_NAME_MAX 9
|
||||
# endif
|
||||
#endif /* LOGIN_NAME_MAX */
|
||||
|
||||
size_t
|
||||
sudo_login_name_max_v1(void)
|
||||
{
|
||||
|
@ -45,14 +45,6 @@
|
||||
#include <cvtsudoers.h>
|
||||
#include <pwutil.h>
|
||||
|
||||
#ifndef LOGIN_NAME_MAX
|
||||
# ifdef _POSIX_LOGIN_NAME_MAX
|
||||
# define LOGIN_NAME_MAX _POSIX_LOGIN_NAME_MAX
|
||||
# else
|
||||
# define LOGIN_NAME_MAX 9
|
||||
# endif
|
||||
#endif /* LOGIN_NAME_MAX */
|
||||
|
||||
#define FIELD_SIZE(src, name, size) \
|
||||
do { \
|
||||
if ((src)->name) { \
|
||||
|
@ -41,14 +41,6 @@
|
||||
#include <sudoers.h>
|
||||
#include <pwutil.h>
|
||||
|
||||
#ifndef LOGIN_NAME_MAX
|
||||
# ifdef _POSIX_LOGIN_NAME_MAX
|
||||
# define LOGIN_NAME_MAX _POSIX_LOGIN_NAME_MAX
|
||||
# else
|
||||
# define LOGIN_NAME_MAX 9
|
||||
# endif
|
||||
#endif /* LOGIN_NAME_MAX */
|
||||
|
||||
/*
|
||||
* For testsudoers and cvtsudoers need to support building with a different
|
||||
* function prefix and using custom getpwnam/getpwuid/getgrnam/getgrgid.
|
||||
|
Loading…
x
Reference in New Issue
Block a user