libspl: move cred definitions from zfs_context.h

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes #17861
This commit is contained in:
Rob Norris
2025-08-25 22:00:24 +10:00
committed by Brian Behlendorf
parent 3823492ca1
commit 52cf8eac42
2 changed files with 18 additions and 15 deletions
+18
View File
@@ -28,6 +28,24 @@
#ifndef _LIBSPL_SYS_CRED_H
#define _LIBSPL_SYS_CRED_H
#include <sys/stat.h>
/*
* Credentials
*/
typedef struct cred cred_t;
extern uid_t crgetuid(cred_t *cr);
extern uid_t crgetruid(cred_t *cr);
extern gid_t crgetgid(cred_t *cr);
extern int crgetngroups(cred_t *cr);
extern gid_t *crgetgroups(cred_t *cr);
#define kcred NULL
#define CRED() NULL
#define crhold(cr) ((void)cr)
#define crfree(cr) ((void)cr)
#endif