2021-05-04 17:43:32 +03:00
|
|
|
//---------------------------------------------------------------------//
|
|
|
|
// Bounds-safe interfaces for functions in grp.h that //
|
|
|
|
// take pointer arguments. //
|
|
|
|
// //
|
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2021-05-19 20:38:55 +03:00
|
|
|
// The Windows environment may not have grp.h
|
|
|
|
#if defined __has_include_next && __has_include_next(<grp.h>)
|
|
|
|
|
2021-05-04 17:43:32 +03:00
|
|
|
#ifdef __checkedc
|
|
|
|
#pragma CHECKED_SCOPE push
|
|
|
|
#pragma CHECKED_SCOPE off
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include_next <grp.h>
|
|
|
|
|
|
|
|
#ifdef __checkedc
|
|
|
|
#pragma CHECKED_SCOPE pop
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __checkedc
|
|
|
|
#ifndef __GRP_CHECKED_H
|
|
|
|
#define __GRP_CHECKED_H
|
|
|
|
|
|
|
|
#pragma CHECKED_SCOPE push
|
|
|
|
#pragma CHECKED_SCOPE on
|
|
|
|
|
|
|
|
int initgroups(const char *user : itype(_Nt_array_ptr<const char>), gid_t group);
|
|
|
|
|
|
|
|
#pragma CHECKED_SCOPE pop
|
|
|
|
|
|
|
|
#endif // guard
|
|
|
|
#endif // Checked C
|
2021-05-19 20:38:55 +03:00
|
|
|
|
|
|
|
#else // doesn't have grp.h
|
|
|
|
#error "cannot include 'grp_checked.h' because this system does not have the original 'grp.h'"
|
|
|
|
#endif
|