lib/chkname.[ch]: Fix includes

Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
Alejandro Colomar 2024-05-11 01:41:52 +02:00 committed by Iker Pedrosa
parent d8e6a8b99b
commit 27e467a61a
2 changed files with 14 additions and 1 deletions

View File

@ -5,6 +5,7 @@
// SPDX-FileCopyrightText: 2023-2024, Alejandro Colomar <alx@kernel.org>
// SPDX-License-Identifier: BSD-3-Clause
/*
* is_valid_user_name(), is_valid_group_name() - check the new user/group
* name for validity;
@ -13,6 +14,7 @@
* false - bad name
*/
#include <config.h>
#ident "$Id$"
@ -20,11 +22,17 @@
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <stdbool.h>
#include <stddef.h>
#include <unistd.h>
#include "defines.h"
#include "chkname.h"
int allow_bad_names = false;
static bool is_valid_name (const char *name)
{
if (allow_bad_names) {

View File

@ -11,6 +11,7 @@
#ifndef _CHKNAME_H_
#define _CHKNAME_H_
/*
* is_valid_user_name(), is_valid_group_name() - check the new user/group
* name for validity;
@ -19,7 +20,11 @@
* false - bad name
*/
#include "defines.h"
#include <config.h>
#include <stdbool.h>
extern bool is_valid_user_name (const char *name);
extern bool is_valid_group_name (const char *name);