])
])
+# since 2.6.27 have linux/cred.h defined current_* macro
+AC_DEFUN([LN_HAVE_LINUX_CRED_H],
+[LB_CHECK_FILE([$LINUX/include/linux/cred.h],[
+ AC_DEFINE(HAVE_LINUX_CRED_H, 1,
+ [kernel has include/linux/cred.h])
+],[
+ AC_MSG_RESULT([no])
+])
+])
+
#
#
# LN_CONFIG_USERSPACE
# 2.6.27
LN_SOCK_MAP_FD_2ARG
LN_FUNC_DUMP_TRACE
+LN_HAVE_LINUX_CRED_H
#2.6.29
LN_STRUCT_CRED_IN_TASK
# 2.6.30
current->xxx; \
})
+#ifndef HAVE_LINUX_CRED_H
+
#define current_uid() (current_cred_xxx(uid))
#define current_gid() (current_cred_xxx(gid))
#define current_euid() (current_cred_xxx(euid))
#define current_fsuid() (current_cred_xxx(fsuid))
#define current_fsgid() (current_cred_xxx(fsgid))
#define current_cap() (current_cred_xxx(cap_effective))
+
+#endif /* HAVE_LINUX_CRED_H */
+
#define current_user() (current_cred_xxx(user))
#define current_user_ns() (current_cred_xxx(user)->user_ns)
#define current_security() (current_cred_xxx(security))
#define prepare_creds() (current)
#define commit_creds(a)
-#endif
+
+#endif /* HAVE_STRUCT_CRED */
#endif