mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-01 14:55:12 +00:00
Move LOGIN_NAME_MAX compat define to login_max.c
This commit is contained in:
@@ -30,6 +30,14 @@
|
|||||||
#include <sudo_compat.h>
|
#include <sudo_compat.h>
|
||||||
#include <sudo_util.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
|
size_t
|
||||||
sudo_login_name_max_v1(void)
|
sudo_login_name_max_v1(void)
|
||||||
{
|
{
|
||||||
|
@@ -45,14 +45,6 @@
|
|||||||
#include <cvtsudoers.h>
|
#include <cvtsudoers.h>
|
||||||
#include <pwutil.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) \
|
#define FIELD_SIZE(src, name, size) \
|
||||||
do { \
|
do { \
|
||||||
if ((src)->name) { \
|
if ((src)->name) { \
|
||||||
|
@@ -41,14 +41,6 @@
|
|||||||
#include <sudoers.h>
|
#include <sudoers.h>
|
||||||
#include <pwutil.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
|
* For testsudoers and cvtsudoers need to support building with a different
|
||||||
* function prefix and using custom getpwnam/getpwuid/getgrnam/getgrgid.
|
* function prefix and using custom getpwnam/getpwuid/getgrnam/getgrgid.
|
||||||
|
Reference in New Issue
Block a user