b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

单循环链表 Linux VFS数据结构(9)

电脑杂谈  发布时间:2018-02-14 03:35:51  来源:网络整理

从Linux kernel 2.6.29开始,task_struct新增cred结构体描述进程环境,这些信息都是特定于进程的,而不是特定于打开的文件的,所以不把这些信息嵌入在file对象中自是也合情合理。file结构的cred结构体指针类型的f_cred成员指向cred结构。cred结构体其定义如下:

---------------------------------------------------------------------

include/linux/cred.h
struct cred {

   atomic_t usage;

#ifdef CONFIG_DEBUG_CREDENTIALS

   atomic_t subscribers; /* number of processes subscribed */

   void     *put_addr;

   unsigned magic;

#define CRED_MAGIC 0x43736564

#define CRED_MAGIC_DEAD  0x44656144

#endif

   uid_t    uid;     /* real UID of the task */

   gid_t    gid;     /* real GID of the task */

   uid_t    suid;    /* saved UID of the task */

   gid_t    sgid;    /* saved GID of the task */

   uid_t    euid;    /* effective UID of the task */

   gid_t    egid;    /* effective GID of the task */

   uid_t    fsuid;   /* UID for VFS ops */

   gid_t    fsgid;   /* GID for VFS ops */

   unsigned securebits; /* SUID-less security management */

   kernel_cap_t cap_inheritable; /* caps our children can inherit */

   kernel_cap_t cap_permitted;  /* caps we're permitted */

   kernel_cap_t cap_effective;  /* caps we can actually use */

   kernel_cap_t cap_bset; /* capability bounding set */

#ifdef CONFIG_KEYS

   unsigned char   jit_keyring; /* default keyring to attach requested

                 * keys to */

   struct key  *thread_keyring; /* keyring private to this thread */

   struct key  *request_key_auth; /* assumed request_key authority */

   struct thread_group_cred *tgcred; /* thread-group shared credentials */

#endif

#ifdef CONFIG_SECURITY

   void     *security;  /* subjective LSM security */

#endif

   struct user_struct *user;   /* real user ID subscription */

   struct group_info *group_info; /* supplementary groups for euid/fsgid */

   struct rcu_head rcu;     /* RCU deletion hook */

};


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-76619-9.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    • 李正封
      李正封

      啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊

    每日福利
    热点图片
    拼命载入中...