April 2024 | ||||||
Mo | Tu | We | Th | Fr | Sa | Su |
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 |
001: /* Copyright (C) 2009 Free Software Foundation, Inc. 002: This file is part of the GNU C Library. 003: 004: The GNU C Library is free software; you can redistribute it and/or 005: modify it under the terms of the GNU Lesser General Public 006: License as published by the Free Software Foundation; either 007: version 2.1 of the License, or (at your option) any later version. 008: 009: The GNU C Library is distributed in the hope that it will be useful, 010: but WITHOUT ANY WARRANTY; without even the implied warranty of 011: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 012: Lesser General Public License for more details. 013: 014: You should have received a copy of the GNU Lesser General Public 015: License along with the GNU C Library; if not, write to the Free 016: Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 017: 02111-1307 USA. */ 018: 019: /* Declaration of types and functions for shadow group suite. */ 020: 021: #ifndef _GSHADOW_H 022: #define _GSHADOW_H 1 023: 024: #include <features.h> 025: 026: #include <paths.h> 027: 028: #define __need_FILE 029: #include <stdio.h> 030: #define __need_size_t 031: #include <stddef.h> 032: 033: /* Path to the user database files. */ 034: #define GSHADOW _PATH_GSHADOW 035: 036: 037: __BEGIN_DECLS 038: 039: /* Structure of the group file. */ 040: struct sgrp 041: { 042: char *sg_namp; /* Group name. */ 043: char *sg_passwd; /* Encrypted password. */ 044: char **sg_adm; /* Group administrator list. */ 045: char **sg_mem; /* Group member list. */ 046: }; 047: 048: 049: /* Open database for reading. 050: 051: This function is not part of POSIX and therefore no official 052: cancellation point. But due to similarity with an POSIX interface 053: or due to the implementation it is a cancellation point and 054: therefore not marked with __THROW. */ 055: extern void setsgent (void); 056: 057: /* Close database. 058: 059: This function is not part of POSIX and therefore no official 060: cancellation point. But due to similarity with an POSIX interface 061: or due to the implementation it is a cancellation point and 062: therefore not marked with __THROW. */ 063: extern void endsgent (void); 064: 065: /* Get next entry from database, perhaps after opening the file. 066: 067: This function is not part of POSIX and therefore no official 068: cancellation point. But due to similarity with an POSIX interface 069: or due to the implementation it is a cancellation point and 070: therefore not marked with __THROW. */ 071: extern struct sgrp *getsgent (void); 072: 073: /* Get shadow entry matching NAME. 074: 075: This function is not part of POSIX and therefore no official 076: cancellation point. But due to similarity with an POSIX interface 077: or due to the implementation it is a cancellation point and 078: therefore not marked with __THROW. */ 079: extern struct sgrp *getsgnam (__const char *__name); 080: 081: /* Read shadow entry from STRING. 082: 083: This function is not part of POSIX and therefore no official 084: cancellation point. But due to similarity with an POSIX interface 085: or due to the implementation it is a cancellation point and 086: therefore not marked with __THROW. */ 087: extern struct sgrp *sgetsgent (__const char *__string); 088: 089: /* Read next shadow entry from STREAM. 090: 091: This function is not part of POSIX and therefore no official 092: cancellation point. But due to similarity with an POSIX interface 093: or due to the implementation it is a cancellation point and 094: therefore not marked with __THROW. */ 095: extern struct sgrp *fgetsgent (FILE *__stream); 096: 097: /* Write line containing shadow password entry to stream. 098: 099: This function is not part of POSIX and therefore no official 100: cancellation point. But due to similarity with an POSIX interface 101: or due to the implementation it is a cancellation point and 102: therefore not marked with __THROW. */ 103: extern int putsgent (__const struct sgrp *__g, FILE *__stream); 104: 105: 106: #ifdef __USE_MISC 107: /* Reentrant versions of some of the functions above. 108: 109: These functions are not part of POSIX and therefore no official 110: cancellation point. But due to similarity with an POSIX interface 111: or due to the implementation they are cancellation points and 112: therefore not marked with __THROW. */ 113: extern int getsgent_r (struct sgrp *__result_buf, char *__buffer, 114: size_t __buflen, struct sgrp **__result); 115: 116: extern int getsgnam_r (__const char *__name, struct sgrp *__result_buf, 117: char *__buffer, size_t __buflen, 118: struct sgrp **__result); 119: 120: extern int sgetsgent_r (__const char *__string, struct sgrp *__result_buf, 121: char *__buffer, size_t __buflen, 122: struct sgrp **__result); 123: 124: extern int fgetsgent_r (FILE *__stream, struct sgrp *__result_buf, 125: char *__buffer, size_t __buflen, 126: struct sgrp **__result); 127: #endif /* misc */ 128: 129: __END_DECLS 130: 131: #endif /* gshadow.h */ 132: