|
Packit |
6c4009 |
/* Copyright (C) 2009-2018 Free Software Foundation, Inc.
|
|
Packit |
6c4009 |
This file is part of the GNU C Library.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
The GNU C Library is free software; you can redistribute it and/or
|
|
Packit |
6c4009 |
modify it under the terms of the GNU Lesser General Public
|
|
Packit |
6c4009 |
License as published by the Free Software Foundation; either
|
|
Packit |
6c4009 |
version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit |
6c4009 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
6c4009 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
6c4009 |
Lesser General Public License for more details.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
You should have received a copy of the GNU Lesser General Public
|
|
Packit |
6c4009 |
License along with the GNU C Library; if not, see
|
|
Packit |
6c4009 |
<http://www.gnu.org/licenses/>. */
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Declaration of types and functions for shadow group suite. */
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#ifndef _GSHADOW_H
|
|
Packit |
6c4009 |
#define _GSHADOW_H 1
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#include <features.h>
|
|
Packit |
6c4009 |
#include <paths.h>
|
|
Packit |
6c4009 |
#include <bits/types/FILE.h>
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#define __need_size_t
|
|
Packit |
6c4009 |
#include <stddef.h>
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Path to the user database files. */
|
|
Packit |
6c4009 |
#define GSHADOW _PATH_GSHADOW
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
__BEGIN_DECLS
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Structure of the group file. */
|
|
Packit |
6c4009 |
struct sgrp
|
|
Packit |
6c4009 |
{
|
|
Packit |
6c4009 |
char *sg_namp; /* Group name. */
|
|
Packit |
6c4009 |
char *sg_passwd; /* Encrypted password. */
|
|
Packit |
6c4009 |
char **sg_adm; /* Group administrator list. */
|
|
Packit |
6c4009 |
char **sg_mem; /* Group member list. */
|
|
Packit |
6c4009 |
};
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Open database for reading.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
This function is not part of POSIX and therefore no official
|
|
Packit |
6c4009 |
cancellation point. But due to similarity with an POSIX interface
|
|
Packit |
6c4009 |
or due to the implementation it is a cancellation point and
|
|
Packit |
6c4009 |
therefore not marked with __THROW. */
|
|
Packit |
6c4009 |
extern void setsgent (void);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Close database.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
This function is not part of POSIX and therefore no official
|
|
Packit |
6c4009 |
cancellation point. But due to similarity with an POSIX interface
|
|
Packit |
6c4009 |
or due to the implementation it is a cancellation point and
|
|
Packit |
6c4009 |
therefore not marked with __THROW. */
|
|
Packit |
6c4009 |
extern void endsgent (void);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Get next entry from database, perhaps after opening the file.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
This function is not part of POSIX and therefore no official
|
|
Packit |
6c4009 |
cancellation point. But due to similarity with an POSIX interface
|
|
Packit |
6c4009 |
or due to the implementation it is a cancellation point and
|
|
Packit |
6c4009 |
therefore not marked with __THROW. */
|
|
Packit |
6c4009 |
extern struct sgrp *getsgent (void);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Get shadow entry matching NAME.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
This function is not part of POSIX and therefore no official
|
|
Packit |
6c4009 |
cancellation point. But due to similarity with an POSIX interface
|
|
Packit |
6c4009 |
or due to the implementation it is a cancellation point and
|
|
Packit |
6c4009 |
therefore not marked with __THROW. */
|
|
Packit |
6c4009 |
extern struct sgrp *getsgnam (const char *__name);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Read shadow entry from STRING.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
This function is not part of POSIX and therefore no official
|
|
Packit |
6c4009 |
cancellation point. But due to similarity with an POSIX interface
|
|
Packit |
6c4009 |
or due to the implementation it is a cancellation point and
|
|
Packit |
6c4009 |
therefore not marked with __THROW. */
|
|
Packit |
6c4009 |
extern struct sgrp *sgetsgent (const char *__string);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Read next shadow entry from STREAM.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
This function is not part of POSIX and therefore no official
|
|
Packit |
6c4009 |
cancellation point. But due to similarity with an POSIX interface
|
|
Packit |
6c4009 |
or due to the implementation it is a cancellation point and
|
|
Packit |
6c4009 |
therefore not marked with __THROW. */
|
|
Packit |
6c4009 |
extern struct sgrp *fgetsgent (FILE *__stream);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Write line containing shadow password entry to stream.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
This function is not part of POSIX and therefore no official
|
|
Packit |
6c4009 |
cancellation point. But due to similarity with an POSIX interface
|
|
Packit |
6c4009 |
or due to the implementation it is a cancellation point and
|
|
Packit |
6c4009 |
therefore not marked with __THROW. */
|
|
Packit |
6c4009 |
extern int putsgent (const struct sgrp *__g, FILE *__stream);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#ifdef __USE_MISC
|
|
Packit |
6c4009 |
/* Reentrant versions of some of the functions above.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
These functions are not part of POSIX and therefore no official
|
|
Packit |
6c4009 |
cancellation point. But due to similarity with an POSIX interface
|
|
Packit |
6c4009 |
or due to the implementation they are cancellation points and
|
|
Packit |
6c4009 |
therefore not marked with __THROW. */
|
|
Packit |
6c4009 |
extern int getsgent_r (struct sgrp *__result_buf, char *__buffer,
|
|
Packit |
6c4009 |
size_t __buflen, struct sgrp **__result);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
extern int getsgnam_r (const char *__name, struct sgrp *__result_buf,
|
|
Packit |
6c4009 |
char *__buffer, size_t __buflen,
|
|
Packit |
6c4009 |
struct sgrp **__result);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
extern int sgetsgent_r (const char *__string, struct sgrp *__result_buf,
|
|
Packit |
6c4009 |
char *__buffer, size_t __buflen,
|
|
Packit |
6c4009 |
struct sgrp **__result);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
extern int fgetsgent_r (FILE *__stream, struct sgrp *__result_buf,
|
|
Packit |
6c4009 |
char *__buffer, size_t __buflen,
|
|
Packit |
6c4009 |
struct sgrp **__result);
|
|
Packit |
6c4009 |
#endif /* misc */
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
__END_DECLS
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#endif /* gshadow.h */
|