主要是新版linux kernel,current_fsuid() function有修改。
這function定義在
/usr/src/linux-headers-X.XX.X-XX/include/linux/cred.h
struct cred {
...
kuid_t fsuid; /* UID for VFS ops */
kgid_t fsgid; /* GID for VFS ops */
…
struct cred {
...
kuid_t fsuid; /* UID for VFS ops */
kgid_t fsgid; /* GID for VFS ops */
…
typedef struct {
uid_t val;
} kuid_t;
可依下面方式更改解決此問題。
os/linux/xxx_linux.c
pOSFSInfo->fsuid = current_fsuid().val;
pOSFSInfo->fsgid = current_fsgid().val;
或是
include/os/xxx_linux.h
typedef struct _OS_FS_INFO_
{
kuid_t fsuid;
kgid_t fsgid;
mm_segment_t fs;
} OS_FS_INFO;