2014-11-19 00:06:40 +08:00
|
|
|
|
#ifndef ACL_SET_UGID_INCLUDE_H
|
|
|
|
|
#define ACL_SET_UGID_INCLUDE_H
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#include "../acl_define.h"
|
|
|
|
|
#ifdef ACL_UNIX
|
|
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD>ó<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD> ID <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ID
|
|
|
|
|
* @param uid {uid_t} <EFBFBD>û<EFBFBD> ID
|
|
|
|
|
* @param gid {gid_t} <EFBFBD><EFBFBD> ID
|
|
|
|
|
* @return {int} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD>0 <EFBFBD><EFBFBD>ʾ<EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD>-1 <EFBFBD><EFBFBD>ʾʧ<EFBFBD><EFBFBD>
|
|
|
|
|
*/
|
|
|
|
|
int acl_set_ugid(uid_t uid, gid_t gid);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <EFBFBD>ij<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD> ID Ϊָ<EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD> ID
|
|
|
|
|
* @param user {char* } ϵͳ<EFBFBD>û<EFBFBD><EFBFBD>˺<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @return {int} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD>0 <EFBFBD><EFBFBD>ʾ<EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD>-1 <EFBFBD><EFBFBD>ʾʧ<EFBFBD><EFBFBD>
|
|
|
|
|
*/
|
|
|
|
|
int acl_change_uid(const char *user);
|
|
|
|
|
|
|
|
|
|
#endif /* ACL_UNIX*/
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|