Signed-off-by: Alejandro Colomar <alx@kernel.org>
// 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;
* false - bad name
*/
+
#include <config.h>
#ident "$Id$"
#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) {
#ifndef _CHKNAME_H_
#define _CHKNAME_H_
+
/*
* is_valid_user_name(), is_valid_group_name() - check the new user/group
* name for validity;
* 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);