Symbol: cred
arch/mips/kernel/mips-mt-fpaff.c
52
const struct cred *cred = current_cred(), *pcred;
arch/mips/kernel/mips-mt-fpaff.c
57
match = (uid_eq(cred->euid, pcred->euid) ||
arch/mips/kernel/mips-mt-fpaff.c
58
uid_eq(cred->euid, pcred->uid));
block/blk-ioc.c
247
const struct cred *cred = current_cred(), *tcred;
block/blk-ioc.c
251
if (!uid_eq(tcred->uid, cred->euid) &&
block/blk-ioc.c
252
!uid_eq(tcred->uid, cred->uid) && !capable(CAP_SYS_NICE)) {
drivers/android/binder.c
2244
if (security_binder_transfer_binder(proc->cred, target_proc->cred)) {
drivers/android/binder.c
2290
if (security_binder_transfer_binder(proc->cred, target_proc->cred)) {
drivers/android/binder.c
2378
ret = security_binder_transfer_file(proc->cred, target_proc->cred, file);
drivers/android/binder.c
3248
if (security_binder_transaction(proc->cred,
drivers/android/binder.c
3249
target_proc->cred) < 0) {
drivers/android/binder.c
3353
security_cred_getsecid(proc->cred, &secid);
drivers/android/binder.c
5325
put_cred(proc->cred);
drivers/android/binder.c
5520
ret = security_binder_set_context_mgr(proc->cred);
drivers/android/binder.c
6072
proc->cred = get_cred(filp->f_cred);
drivers/android/binder_internal.h
426
const struct cred *cred;
drivers/connector/cn_proc.c
176
const struct cred *cred;
drivers/connector/cn_proc.c
188
cred = __task_cred(task);
drivers/connector/cn_proc.c
190
ev->event_data.id.r.ruid = from_kuid_munged(&init_user_ns, cred->uid);
drivers/connector/cn_proc.c
191
ev->event_data.id.e.euid = from_kuid_munged(&init_user_ns, cred->euid);
drivers/connector/cn_proc.c
193
ev->event_data.id.r.rgid = from_kgid_munged(&init_user_ns, cred->gid);
drivers/connector/cn_proc.c
194
ev->event_data.id.e.egid = from_kgid_munged(&init_user_ns, cred->egid);
drivers/crypto/ccp/sev-dev.c
269
CLASS(prepare_creds, cred)();
drivers/crypto/ccp/sev-dev.c
270
if (!cred)
drivers/crypto/ccp/sev-dev.c
273
cred->fsuid = GLOBAL_ROOT_UID;
drivers/crypto/ccp/sev-dev.c
275
scoped_with_creds(cred)
drivers/hwmon/nct6775-platform.c
588
int cred;
drivers/hwmon/nct6775-platform.c
595
cred = sio_data->sio_inb(sio_data, 0xed);
drivers/hwmon/nct6775-platform.c
632
(!dsw_en || (cred & BIT(4)));
drivers/hwmon/nct6775-platform.c
638
pwm6pin = (cr2a & BIT(3)) && (cred & BIT(2));
drivers/hwmon/nct6775-platform.c
647
(!dsw_en || (cred & BIT(4)));
drivers/hwmon/nct6775-platform.c
656
pwm6pin = (cr2a & BIT(3)) && (cred & BIT(2));
drivers/hwmon/nct6775-platform.c
674
pwm6pin |= cred & BIT(2);
drivers/hwmon/nct6775-platform.c
688
pwm6pin |= !(cred & BIT(2)) && (cr2a & BIT(3));
drivers/hwmon/nct6775-platform.c
709
pwm6pin |= !as_seq1_en && !(cred & BIT(2)) && (cr2a & BIT(3));
drivers/misc/vmw_vmci/vmci_context.c
1154
if (context->cred)
drivers/misc/vmw_vmci/vmci_context.c
1155
is_owner = uid_eq(context->cred->uid, uid);
drivers/misc/vmw_vmci/vmci_context.c
148
if (cred)
drivers/misc/vmw_vmci/vmci_context.c
149
context->cred = get_cred(cred);
drivers/misc/vmw_vmci/vmci_context.c
461
if (context->cred)
drivers/misc/vmw_vmci/vmci_context.c
462
put_cred(context->cred);
drivers/misc/vmw_vmci/vmci_context.c
83
const struct cred *cred)
drivers/misc/vmw_vmci/vmci_context.h
128
const struct cred *cred);
drivers/misc/vmw_vmci/vmci_context.h
80
const struct cred *cred;
drivers/misc/vmw_vmci/vmci_host.c
301
const struct cred *cred;
drivers/misc/vmw_vmci/vmci_host.c
323
cred = get_current_cred();
drivers/misc/vmw_vmci/vmci_host.c
327
cred);
drivers/misc/vmw_vmci/vmci_host.c
328
put_cred(cred);
drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
940
u32 cred; /* Current available credits */
drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
2884
T("Credits:", cred);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c
113
eosw_txq->cred = adap->params.ofldq_wr_cred;
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c
132
eosw_txq->cred = adap->params.ofldq_wr_cred;
drivers/net/ethernet/chelsio/cxgb4/sge.c
2244
eosw_txq->cred -= wrlen16;
drivers/net/ethernet/chelsio/cxgb4/sge.c
2302
if (unlikely(left < 0 || wrlen16 > eosw_txq->cred)) {
drivers/net/ethernet/chelsio/cxgb4/sge.c
2310
eosw_txq->cred -= wrlen16;
drivers/net/ethernet/chelsio/cxgb4/sge.c
4116
eosw_txq->cred += cpl->credits;
drivers/net/ethernet/chelsio/cxgb4/sge.c
541
unsigned int cred = q->avail;
drivers/net/ethernet/chelsio/cxgb4/sge.c
618
out: cred = q->avail - cred;
drivers/net/ethernet/chelsio/cxgb4/sge.c
619
q->pend_cred += cred;
drivers/net/ethernet/chelsio/cxgb4/sge.c
629
return cred;
drivers/net/ethernet/chelsio/cxgb4vf/sge.c
610
unsigned int cred = fl->avail;
drivers/net/ethernet/chelsio/cxgb4vf/sge.c
709
cred = fl->avail - cred;
drivers/net/ethernet/chelsio/cxgb4vf/sge.c
710
fl->pend_cred += cred;
drivers/net/ethernet/chelsio/cxgb4vf/sge.c
718
return cred;
drivers/net/ethernet/pensando/ionic/ionic_regs.h
66
int intr_idx, u32 cred, u32 flags)
drivers/net/ethernet/pensando/ionic/ionic_regs.h
68
if (WARN_ON_ONCE(cred > IONIC_INTR_CRED_COUNT)) {
drivers/net/ethernet/pensando/ionic/ionic_regs.h
69
cred = ioread32(&intr_ctrl[intr_idx].credits);
drivers/net/ethernet/pensando/ionic/ionic_regs.h
70
cred &= IONIC_INTR_CRED_COUNT_SIGNED;
drivers/net/ethernet/pensando/ionic/ionic_regs.h
73
iowrite32(cred | flags, &intr_ctrl[intr_idx].credits);
drivers/net/ethernet/pensando/ionic/ionic_regs.h
79
u32 cred;
drivers/net/ethernet/pensando/ionic/ionic_regs.h
81
cred = ioread32(&intr_ctrl[intr_idx].credits);
drivers/net/ethernet/pensando/ionic/ionic_regs.h
82
cred &= IONIC_INTR_CRED_COUNT_SIGNED;
drivers/net/ethernet/pensando/ionic/ionic_regs.h
83
cred |= IONIC_INTR_CRED_RESET_COALESCE;
drivers/net/ethernet/pensando/ionic/ionic_regs.h
84
iowrite32(cred, &intr_ctrl[intr_idx].credits);
drivers/net/tun.c
515
const struct cred *cred = current_cred();
drivers/net/tun.c
518
return ((uid_valid(tun->owner) && !uid_eq(cred->euid, tun->owner)) ||
drivers/usb/core/devio.c
1073
ps->cred = get_current_cred();
drivers/usb/core/devio.c
1118
put_cred(ps->cred);
drivers/usb/core/devio.c
1933
as->cred = get_current_cred();
drivers/usb/core/devio.c
2875
ps->disc_pid, ps->cred);
drivers/usb/core/devio.c
421
if (as->cred)
drivers/usb/core/devio.c
422
put_cred(as->cred);
drivers/usb/core/devio.c
628
const struct cred *cred = NULL;
drivers/usb/core/devio.c
641
cred = get_cred(as->cred);
drivers/usb/core/devio.c
657
kill_pid_usb_asyncio(signr, errno, addr, pid, cred);
drivers/usb/core/devio.c
659
put_cred(cred);
drivers/usb/core/devio.c
73
const struct cred *cred;
drivers/usb/core/devio.c
98
const struct cred *cred;
fs/aio.c
177
struct cred *creds;
fs/backing-file.c
203
scoped_with_creds(ctx->cred)
fs/backing-file.c
270
scoped_with_creds(ctx->cred)
fs/backing-file.c
285
scoped_with_creds(ctx->cred)
fs/backing-file.c
312
scoped_with_creds(ctx->cred) {
fs/backing-file.c
339
scoped_with_creds(ctx->cred)
fs/backing-file.c
34
const struct cred *cred)
fs/backing-file.c
39
f = alloc_empty_backing_file(flags, cred);
fs/backing-file.c
57
umode_t mode, const struct cred *cred)
fs/backing-file.c
63
f = alloc_empty_backing_file(flags, cred);
fs/binfmt_elf.c
1524
const struct cred *cred;
fs/binfmt_elf.c
1557
cred = __task_cred(p);
fs/binfmt_elf.c
1558
SET_UID(psinfo->pr_uid, from_kuid_munged(cred->user_ns, cred->uid));
fs/binfmt_elf.c
1559
SET_GID(psinfo->pr_gid, from_kgid_munged(cred->user_ns, cred->gid));
fs/binfmt_elf.c
184
const struct cred *cred = current_cred();
fs/binfmt_elf.c
261
NEW_AUX_ENT(AT_UID, from_kuid_munged(cred->user_ns, cred->uid));
fs/binfmt_elf.c
262
NEW_AUX_ENT(AT_EUID, from_kuid_munged(cred->user_ns, cred->euid));
fs/binfmt_elf.c
263
NEW_AUX_ENT(AT_GID, from_kgid_munged(cred->user_ns, cred->gid));
fs/binfmt_elf.c
264
NEW_AUX_ENT(AT_EGID, from_kgid_munged(cred->user_ns, cred->egid));
fs/binfmt_elf_fdpic.c
1337
const struct cred *cred;
fs/binfmt_elf_fdpic.c
1370
cred = __task_cred(p);
fs/binfmt_elf_fdpic.c
1371
SET_UID(psinfo->pr_uid, from_kuid_munged(cred->user_ns, cred->uid));
fs/binfmt_elf_fdpic.c
1372
SET_GID(psinfo->pr_gid, from_kgid_munged(cred->user_ns, cred->gid));
fs/binfmt_elf_fdpic.c
501
const struct cred *cred = current_cred();
fs/binfmt_elf_fdpic.c
652
NEW_AUX_ENT(AT_UID, (elf_addr_t) from_kuid_munged(cred->user_ns, cred->uid));
fs/binfmt_elf_fdpic.c
653
NEW_AUX_ENT(AT_EUID, (elf_addr_t) from_kuid_munged(cred->user_ns, cred->euid));
fs/binfmt_elf_fdpic.c
654
NEW_AUX_ENT(AT_GID, (elf_addr_t) from_kgid_munged(cred->user_ns, cred->gid));
fs/binfmt_elf_fdpic.c
655
NEW_AUX_ENT(AT_EGID, (elf_addr_t) from_kgid_munged(cred->user_ns, cred->egid));
fs/cachefiles/cache.c
23
const struct cred *saved_cred;
fs/cachefiles/cache.c
387
const struct cred *saved_cred;
fs/cachefiles/daemon.c
635
const struct cred *saved_cred;
fs/cachefiles/daemon.c
706
const struct cred *saved_cred;
fs/cachefiles/interface.c
182
const struct cred *saved_cred;
fs/cachefiles/interface.c
285
const struct cred *saved_cred;
fs/cachefiles/interface.c
365
const struct cred *saved_cred;
fs/cachefiles/internal.h
391
const struct cred **_saved_cred);
fs/cachefiles/internal.h
394
const struct cred **_saved_cred)
fs/cachefiles/internal.h
400
const struct cred *saved_cred)
fs/cachefiles/internal.h
96
const struct cred *cache_cred; /* security override for accessing cache */
fs/cachefiles/io.c
387
const struct cred *saved_cred;
fs/cachefiles/io.c
608
const struct cred *saved_cred;
fs/cachefiles/io.c
652
const struct cred *saved_cred;
fs/cachefiles/namei.c
441
const struct cred *saved_cred;
fs/cachefiles/ondemand.c
66
const struct cred *saved_cred;
fs/cachefiles/security.c
18
struct cred *new;
fs/cachefiles/security.c
77
const struct cred **_saved_cred)
fs/cachefiles/security.c
79
struct cred *new;
fs/cachefiles/volume.c
22
const struct cred *saved_cred;
fs/cachefiles/xattr.c
196
const struct cred *saved_cred;
fs/ceph/mds_client.c
5670
const struct cred *cred,
fs/ceph/mds_client.c
5673
u32 caller_uid = from_kuid(&init_user_ns, cred->fsuid);
fs/ceph/mds_client.c
5674
u32 caller_gid = from_kgid(&init_user_ns, cred->fsgid);
fs/ceph/mds_client.c
5699
if (!gid_matched && cred->group_info->ngroups) {
fs/ceph/mds_client.c
5700
for (i = 0; i < cred->group_info->ngroups; i++) {
fs/ceph/mds_client.c
5702
cred->group_info->gid[i]);
fs/ceph/mds_client.c
5790
const struct cred *cred = get_current_cred();
fs/ceph/mds_client.c
5791
u32 caller_uid = from_kuid(&init_user_ns, cred->fsuid);
fs/ceph/mds_client.c
5792
u32 caller_gid = from_kgid(&init_user_ns, cred->fsgid);
fs/ceph/mds_client.c
5804
err = ceph_mds_auth_match(mdsc, s, cred, tpath);
fs/ceph/mds_client.c
5806
put_cred(cred);
fs/ceph/mds_client.c
5822
put_cred(cred);
fs/ceph/mds_client.h
327
const struct cred *r_cred;
fs/coredump.c
1185
CLASS(prepare_creds, cred)();
fs/coredump.c
1186
if (!cred)
fs/coredump.c
1195
cred->fsuid = GLOBAL_ROOT_UID;
fs/coredump.c
1200
scoped_with_creds(cred)
fs/coredump.c
239
const struct cred *cred = current_cred();
fs/coredump.c
386
cred->uid));
fs/coredump.c
392
cred->gid));
fs/coredump.c
621
static int umh_coredump_setup(struct subprocess_info *info, struct cred *new)
fs/ecryptfs/ecryptfs_kernel.h
676
const struct cred *cred);
fs/ecryptfs/kthread.c
120
const struct cred *cred)
fs/ecryptfs/kthread.c
135
(*lower_file) = dentry_open(&req.path, flags, cred);
fs/ecryptfs/main.c
110
const struct cred *cred = current_cred();
fs/ecryptfs/main.c
114
rc = ecryptfs_privileged_open(lower_file, path.dentry, path.mnt, cred);
fs/exec.c
1246
retval = set_cred_ucounts(bprm->cred);
fs/exec.c
1255
commit_creds(bprm->cred);
fs/exec.c
1256
bprm->cred = NULL;
fs/exec.c
1285
if (!bprm->cred)
fs/exec.c
1355
bprm->cred = prepare_exec_creds();
fs/exec.c
1356
if (likely(bprm->cred))
fs/exec.c
1379
if (bprm->cred) {
fs/exec.c
1383
abort_creds(bprm->cred);
fs/exec.c
1565
if (!vfsuid_has_mapping(bprm->cred->user_ns, vfsuid) ||
fs/exec.c
1566
!vfsgid_has_mapping(bprm->cred->user_ns, vfsgid))
fs/exec.c
1571
bprm->cred->euid = vfsuid_into_kuid(vfsuid);
fs/exec.c
1576
bprm->cred->egid = vfsgid_into_kgid(vfsgid);
fs/exportfs/expfs.c
277
const struct cred *cred = current_cred();
fs/exportfs/expfs.c
312
file = dentry_open(path, O_RDONLY, cred);
fs/fcntl.c
143
const struct cred *cred = current_cred();
fs/fcntl.c
145
f_owner->uid = cred->uid;
fs/fcntl.c
146
f_owner->euid = cred->euid;
fs/fcntl.c
842
const struct cred *cred;
fs/fcntl.c
846
cred = __task_cred(p);
fs/fcntl.c
848
uid_eq(fown->euid, cred->suid) || uid_eq(fown->euid, cred->uid) ||
fs/fcntl.c
849
uid_eq(fown->uid, cred->suid) || uid_eq(fown->uid, cred->uid)) &&
fs/file_table.c
154
static int init_file(struct file *f, int flags, const struct cred *cred)
fs/file_table.c
158
f->f_cred = get_cred(cred);
fs/file_table.c
218
struct file *alloc_empty_file(int flags, const struct cred *cred)
fs/file_table.c
241
error = init_file(f, flags, cred);
fs/file_table.c
266
struct file *alloc_empty_file_noaccount(int flags, const struct cred *cred)
fs/file_table.c
275
error = init_file(f, flags, cred);
fs/file_table.c
293
struct file *alloc_empty_backing_file(int flags, const struct cred *cred)
fs/file_table.c
302
error = init_file(&ff->file, flags, cred);
fs/fs_context.c
275
fc->cred = get_current_cred();
fs/fs_context.c
283
fc->user_ns = get_user_ns(fc->cred->user_ns);
fs/fs_context.c
384
get_cred(fc->cred);
fs/fs_context.c
504
put_cred(fc->cred);
fs/fuse/backing.c
121
fb->cred = prepare_creds();
fs/fuse/backing.c
25
put_cred(fb->cred);
fs/fuse/dir.c
1657
const struct cred *cred = current_cred();
fs/fuse/dir.c
1659
return (uid_eq(cred->euid, fc->user_id) &&
fs/fuse/dir.c
1660
uid_eq(cred->suid, fc->user_id) &&
fs/fuse/dir.c
1661
uid_eq(cred->uid, fc->user_id) &&
fs/fuse/dir.c
1662
gid_eq(cred->egid, fc->group_id) &&
fs/fuse/dir.c
1663
gid_eq(cred->sgid, fc->group_id) &&
fs/fuse/dir.c
1664
gid_eq(cred->gid, fc->group_id));
fs/fuse/fuse_i.h
109
struct cred *cred;
fs/fuse/fuse_i.h
304
const struct cred *cred;
fs/fuse/passthrough.c
114
.cred = ff->cred,
fs/fuse/passthrough.c
137
.cred = ff->cred,
fs/fuse/passthrough.c
171
&fb->file->f_path, fb->cred);
fs/fuse/passthrough.c
180
ff->cred = get_cred(fb->cred);
fs/fuse/passthrough.c
195
put_cred(ff->cred);
fs/fuse/passthrough.c
196
ff->cred = NULL;
fs/fuse/passthrough.c
36
.cred = ff->cred,
fs/fuse/passthrough.c
63
.cred = ff->cred,
fs/fuse/passthrough.c
88
.cred = ff->cred,
fs/internal.h
107
struct file *alloc_empty_file(int flags, const struct cred *cred);
fs/internal.h
108
struct file *alloc_empty_file_noaccount(int flags, const struct cred *cred);
fs/internal.h
109
struct file *alloc_empty_backing_file(int flags, const struct cred *cred);
fs/lockd/clntlock.c
51
status = lockd_up(nlm_init->net, nlm_init->cred);
fs/lockd/clntlock.c
58
nlm_init->net, nlm_init->cred);
fs/lockd/clntproc.c
265
nlmclnt_call(const struct cred *cred, struct nlm_rqst *req, u32 proc)
fs/lockd/clntproc.c
274
.rpc_cred = cred,
fs/lockd/clntproc.c
410
static int nlmclnt_async_call(const struct cred *cred, struct nlm_rqst *req, u32 proc, const struct rpc_call_ops *tk_ops)
fs/lockd/clntproc.c
415
.rpc_cred = cred,
fs/lockd/clntproc.c
524
const struct cred *cred = nfs_file_cred(fl->c.flc_file);
fs/lockd/clntproc.c
560
status = nlmclnt_call(cred, req, NLMPROC_LOCK);
fs/lockd/clntproc.c
635
nlmclnt_async_call(cred, req, NLMPROC_UNLOCK, &nlmclnt_unlock_ops);
fs/lockd/host.c
165
host->h_cred = get_cred(ni->cred);
fs/lockd/host.c
222
const struct cred *cred)
fs/lockd/host.c
234
.cred = cred,
fs/lockd/host.c
463
.cred = host->h_cred,
fs/lockd/host.c
63
const struct cred *cred;
fs/lockd/mon.c
85
.cred = current_cred(),
fs/lockd/svc.c
161
const struct cred *cred)
fs/lockd/svc.c
168
SVC_SOCK_DEFAULTS, cred);
fs/lockd/svc.c
174
const int family, const struct cred *cred)
fs/lockd/svc.c
180
ln->udp_port ? ln->udp_port : nlm_udpport, cred);
fs/lockd/svc.c
185
ln->tcp_port ? ln->tcp_port : nlm_tcpport, cred);
fs/lockd/svc.c
199
const struct cred *cred)
fs/lockd/svc.c
204
err = create_lockd_family(serv, net, PF_INET, cred);
fs/lockd/svc.c
208
err = create_lockd_family(serv, net, PF_INET6, cred);
fs/lockd/svc.c
224
const struct cred *cred)
fs/lockd/svc.c
236
error = make_socks(serv, net, cred);
fs/lockd/svc.c
380
int lockd_up(struct net *net, const struct cred *cred)
fs/lockd/svc.c
390
error = lockd_up_net(nlmsvc_serv, net, cred);
fs/namei.c
4763
const struct cred *cred)
fs/namei.c
4768
file = alloc_empty_file_noaccount(open_flag, cred);
fs/namei.c
5001
const struct cred *cred)
fs/namei.c
5010
file = alloc_empty_file(flags, cred);
fs/namespace.c
4498
dentry_open(&new_path, O_PATH, fc->cred));
fs/namespace.c
6430
struct user_namespace *user_ns = nsset->cred->user_ns;
fs/nfs/blocklayout/blocklayout.c
563
const struct nfs4_deviceid *id, const struct cred *cred,
fs/nfs/blocklayout/blocklayout.c
570
node = nfs4_find_get_deviceid(server, id, cred, gfp_mask);
fs/nfs/callback.c
43
const struct cred *cred = current_cred();
fs/nfs/callback.c
49
cred);
fs/nfs/callback.c
58
cred);
fs/nfs/client.c
1126
put_cred(server->cred);
fs/nfs/client.c
1147
server->cred = get_cred(fc->cred);
fs/nfs/client.c
1216
server->cred = get_cred(source->cred);
fs/nfs/client.c
539
.cred = cl_init->cred,
fs/nfs/client.c
602
.cred = server->cred,
fs/nfs/client.c
747
.cred = server->cred,
fs/nfs/delegation.c
1390
const struct cred *cred)
fs/nfs/delegation.c
1396
if (!cred)
fs/nfs/delegation.c
1398
status = ops->test_and_free_expired(server, stateid, cred);
fs/nfs/delegation.c
1408
const struct cred *cred;
fs/nfs/delegation.c
1428
cred = get_cred_rcu(delegation->cred);
fs/nfs/delegation.c
1434
nfs_delegation_test_free_expired(inode, &stateid, cred);
fs/nfs/delegation.c
1435
put_cred(cred);
fs/nfs/delegation.c
1549
nfs4_stateid *dst, const struct cred **cred)
fs/nfs/delegation.c
1565
if (cred)
fs/nfs/delegation.c
1566
*cred = get_cred(delegation->cred);
fs/nfs/delegation.c
255
void nfs_inode_reclaim_delegation(struct inode *inode, const struct cred *cred,
fs/nfs/delegation.c
260
const struct cred *oldcred = NULL;
fs/nfs/delegation.c
266
nfs_inode_set_delegation(inode, cred, type, stateid,
fs/nfs/delegation.c
275
oldcred = delegation->cred;
fs/nfs/delegation.c
276
delegation->cred = get_cred(cred);
fs/nfs/delegation.c
298
const struct cred *cred;
fs/nfs/delegation.c
303
cred = get_cred(delegation->cred);
fs/nfs/delegation.c
305
res = nfs4_proc_delegreturn(inode, cred, &delegation->stateid,
fs/nfs/delegation.c
307
put_cred(cred);
fs/nfs/delegation.c
393
const struct cred *cred)
fs/nfs/delegation.c
395
const struct cred *old;
fs/nfs/delegation.c
397
if (cred_fscmp(delegation->cred, cred) != 0) {
fs/nfs/delegation.c
398
old = xchg(&delegation->cred, get_cred(cred));
fs/nfs/delegation.c
415
nfs_update_delegation_cred(delegation, update->cred);
fs/nfs/delegation.c
434
int nfs_inode_set_delegation(struct inode *inode, const struct cred *cred,
fs/nfs/delegation.c
453
delegation->cred = get_cred(cred);
fs/nfs/delegation.c
47
put_cred(delegation->cred);
fs/nfs/delegation.c
48
delegation->cred = NULL;
fs/nfs/delegation.h
19
const struct cred *cred;
fs/nfs/delegation.h
43
int nfs_inode_set_delegation(struct inode *inode, const struct cred *cred,
fs/nfs/delegation.h
46
void nfs_inode_reclaim_delegation(struct inode *inode, const struct cred *cred,
fs/nfs/delegation.h
73
int nfs4_proc_delegreturn(struct inode *inode, const struct cred *cred,
fs/nfs/delegation.h
78
bool nfs4_copy_delegation_stateid(struct inode *inode, fmode_t flags, nfs4_stateid *dst, const struct cred **cred);
fs/nfs/dir.c
3011
static int access_cmp(const struct cred *a, const struct nfs_access_entry *b)
fs/nfs/dir.c
3048
static struct nfs_access_entry *nfs_access_search_rbtree(struct inode *inode, const struct cred *cred)
fs/nfs/dir.c
3055
int cmp = access_cmp(cred, entry);
fs/nfs/dir.c
3068
const struct cred *cred)
fs/nfs/dir.c
3071
const struct cred *pcred;
fs/nfs/dir.c
3078
if (parent == task || cred_fscmp(pcred, cred) != 0)
fs/nfs/dir.c
3087
static int nfs_access_get_cached_locked(struct inode *inode, const struct cred *cred, u32 *mask, bool may_block)
fs/nfs/dir.c
3090
u64 login_time = nfs_access_login_time(current, cred);
fs/nfs/dir.c
3099
cache = nfs_access_search_rbtree(inode, cred);
fs/nfs/dir.c
3133
static int nfs_access_get_cached_rcu(struct inode *inode, const struct cred *cred, u32 *mask)
fs/nfs/dir.c
3139
u64 login_time = nfs_access_login_time(current, cred);
fs/nfs/dir.c
3150
access_cmp(cred, cache) != 0)
fs/nfs/dir.c
3165
int nfs_access_get_cached(struct inode *inode, const struct cred *cred,
fs/nfs/dir.c
3170
status = nfs_access_get_cached_rcu(inode, cred, mask);
fs/nfs/dir.c
3172
status = nfs_access_get_cached_locked(inode, cred, mask,
fs/nfs/dir.c
3181
const struct cred *cred)
fs/nfs/dir.c
3194
cmp = access_cmp(cred, entry);
fs/nfs/dir.c
3217
const struct cred *cred)
fs/nfs/dir.c
3223
cache->fsuid = cred->fsuid;
fs/nfs/dir.c
3224
cache->fsgid = cred->fsgid;
fs/nfs/dir.c
3225
cache->group_info = get_group_info(cred->group_info);
fs/nfs/dir.c
3234
nfs_access_add_rbtree(inode, cache, cred);
fs/nfs/dir.c
3290
static int nfs_do_access(struct inode *inode, const struct cred *cred, int mask)
fs/nfs/dir.c
3299
status = nfs_access_get_cached(inode, cred, &cache.mask, may_block);
fs/nfs/dir.c
3316
status = NFS_PROTO(inode)->access(inode, &cache, cred);
fs/nfs/dir.c
3326
nfs_access_add_cache(inode, &cache, cred);
fs/nfs/dir.c
3353
int nfs_may_open(struct inode *inode, const struct cred *cred, int openflags)
fs/nfs/dir.c
3355
return nfs_do_access(inode, cred, nfs_open_permission_mask(openflags));
fs/nfs/dir.c
3380
const struct cred *cred = current_cred();
fs/nfs/dir.c
3412
res = nfs_do_access(inode, cred, mask);
fs/nfs/dir.c
590
.cred = desc->file->f_cred,
fs/nfs/filelayout/filelayout.c
489
nfs_initiate_pgio(ds_clnt, hdr, hdr->cred,
fs/nfs/filelayout/filelayout.c
531
nfs_initiate_pgio(ds_clnt, hdr, hdr->cred,
fs/nfs/flexfilelayout/flexfilelayout.c
168
struct nfs_client *clp, const struct cred *cred,
fs/nfs/flexfilelayout/flexfilelayout.c
174
return nfs_local_open_fh(clp, cred, fh, &mirror->dss[dss_id].nfl, mode);
fs/nfs/flexfilelayout/flexfilelayout.c
2131
const struct cred *ds_cred;
fs/nfs/flexfilelayout/flexfilelayout.c
2159
ds_cred = ff_layout_get_ds_cred(mirror, &lseg->pls_range, hdr->cred, dss_id);
fs/nfs/flexfilelayout/flexfilelayout.c
2218
const struct cred *ds_cred;
fs/nfs/flexfilelayout/flexfilelayout.c
2242
ds_cred = ff_layout_get_ds_cred(mirror, &lseg->pls_range, hdr->cred, dss_id);
fs/nfs/flexfilelayout/flexfilelayout.c
2312
const struct cred *ds_cred;
fs/nfs/flexfilelayout/flexfilelayout.c
2333
ds_cred = ff_layout_get_ds_cred(mirror, &lseg->pls_range, data->cred, dss_id);
fs/nfs/flexfilelayout/flexfilelayout.c
2343
data->cred = ds_cred;
fs/nfs/flexfilelayout/flexfilelayout.c
303
const struct cred *cred;
fs/nfs/flexfilelayout/flexfilelayout.c
310
cred = rcu_access_pointer(mirror->dss[dss_id].ro_cred);
fs/nfs/flexfilelayout/flexfilelayout.c
311
put_cred(cred);
fs/nfs/flexfilelayout/flexfilelayout.c
312
cred = rcu_access_pointer(mirror->dss[dss_id].rw_cred);
fs/nfs/flexfilelayout/flexfilelayout.c
313
put_cred(cred);
fs/nfs/flexfilelayout/flexfilelayout.c
496
struct cred *kcred;
fs/nfs/flexfilelayout/flexfilelayout.c
497
const struct cred __rcu *cred;
fs/nfs/flexfilelayout/flexfilelayout.c
598
cred = RCU_INITIALIZER(kcred);
fs/nfs/flexfilelayout/flexfilelayout.c
601
rcu_assign_pointer(dss_info->ro_cred, cred);
fs/nfs/flexfilelayout/flexfilelayout.c
603
rcu_assign_pointer(dss_info->rw_cred, cred);
fs/nfs/flexfilelayout/flexfilelayout.c
612
cred = xchg(&mirror->dss[dss_id].ro_cred,
fs/nfs/flexfilelayout/flexfilelayout.c
614
rcu_assign_pointer(dss_info->ro_cred, cred);
fs/nfs/flexfilelayout/flexfilelayout.c
616
cred = xchg(&mirror->dss[dss_id].rw_cred,
fs/nfs/flexfilelayout/flexfilelayout.c
618
rcu_assign_pointer(dss_info->rw_cred, cred);
fs/nfs/flexfilelayout/flexfilelayout.h
246
const struct cred *ff_layout_get_ds_cred(struct nfs4_ff_layout_mirror *mirror,
fs/nfs/flexfilelayout/flexfilelayout.h
248
const struct cred *mdscred,
fs/nfs/flexfilelayout/flexfilelayout.h
86
const struct cred __rcu *ro_cred;
fs/nfs/flexfilelayout/flexfilelayout.h
87
const struct cred __rcu *rw_cred;
fs/nfs/flexfilelayout/flexfilelayoutdev.c
283
static const struct cred *
fs/nfs/flexfilelayout/flexfilelayoutdev.c
286
const struct cred *cred, __rcu **pcred;
fs/nfs/flexfilelayout/flexfilelayoutdev.c
295
cred = rcu_dereference(*pcred);
fs/nfs/flexfilelayout/flexfilelayoutdev.c
296
if (!cred)
fs/nfs/flexfilelayout/flexfilelayoutdev.c
299
cred = get_cred_rcu(cred);
fs/nfs/flexfilelayout/flexfilelayoutdev.c
300
} while(!cred);
fs/nfs/flexfilelayout/flexfilelayoutdev.c
302
return cred;
fs/nfs/flexfilelayout/flexfilelayoutdev.c
429
const struct cred *
fs/nfs/flexfilelayout/flexfilelayoutdev.c
432
const struct cred *mdscred,
fs/nfs/flexfilelayout/flexfilelayoutdev.c
435
const struct cred *cred;
fs/nfs/flexfilelayout/flexfilelayoutdev.c
438
cred = ff_layout_get_mirror_cred(mirror, range->iomode, dss_id);
fs/nfs/flexfilelayout/flexfilelayoutdev.c
439
if (!cred)
fs/nfs/flexfilelayout/flexfilelayoutdev.c
440
cred = get_cred(mdscred);
fs/nfs/flexfilelayout/flexfilelayoutdev.c
442
cred = get_cred(mdscred);
fs/nfs/flexfilelayout/flexfilelayoutdev.c
444
return cred;
fs/nfs/inode.c
1218
ctx->cred = get_cred(filp->f_cred);
fs/nfs/inode.c
1220
ctx->cred = get_current_cred();
fs/nfs/inode.c
1259
put_cred(ctx->cred);
fs/nfs/inode.c
1310
struct nfs_open_context *nfs_find_open_context(struct inode *inode, const struct cred *cred, fmode_t mode)
fs/nfs/inode.c
1317
if (cred != NULL && cred_fscmp(pos->cred, cred) != 0)
fs/nfs/internal.h
310
const struct cred *cred, const struct nfs_rpc_ops *rpc_ops,
fs/nfs/internal.h
320
return cred_fscmp(ctx1->cred, ctx2->cred) == 0 && ctx1->state == ctx2->state;
fs/nfs/internal.h
467
const struct cred *,
fs/nfs/internal.h
484
nfs_local_open_fh(struct nfs_client *clp, const struct cred *cred,
fs/nfs/internal.h
740
const struct cred *cred);
fs/nfs/internal.h
85
const struct cred *cred;
fs/nfs/localio.c
238
__nfs_local_open_fh(struct nfs_client *clp, const struct cred *cred,
fs/nfs/localio.c
247
cred, fh, nfl, pnf, mode);
fs/nfs/localio.c
271
nfs_local_open_fh(struct nfs_client *clp, const struct cred *cred,
fs/nfs/localio.c
287
nf = __nfs_local_open_fh(clp, cred, fh, nfl, pnf, mode);
fs/nfs/mount_clnt.c
163
.cred = current_cred(),
fs/nfs/namespace.c
173
if (fc->cred != server->cred) {
fs/nfs/namespace.c
174
put_cred(fc->cred);
fs/nfs/namespace.c
175
fc->cred = get_cred(server->cred);
fs/nfs/nfs3client.c
101
.cred = mds_srv->cred,
fs/nfs/nfs3proc.c
224
const struct cred *cred)
fs/nfs/nfs3proc.c
235
.rpc_cred = cred,
fs/nfs/nfs3proc.c
692
.rpc_cred = nr_arg->cred,
fs/nfs/nfs40.h
17
const struct cred *cred);
fs/nfs/nfs40client.c
121
const struct cred *cred)
fs/nfs/nfs40client.c
164
status = nfs4_proc_setclientid_confirm(pos, &clid, cred);
fs/nfs/nfs40client.c
213
const struct cred *cred)
fs/nfs/nfs40client.c
227
status = nfs4_proc_setclientid(clp, NFS4_CALLBACK, port, cred, &clid);
fs/nfs/nfs40client.c
233
status = nfs40_walk_client_list(clp, result, cred);
fs/nfs/nfs40proc.c
112
static int nfs4_proc_async_renew(struct nfs_client *clp, const struct cred *cred, unsigned renew_flags)
fs/nfs/nfs40proc.c
117
.rpc_cred = cred,
fs/nfs/nfs40proc.c
136
static int nfs4_proc_renew(struct nfs_client *clp, const struct cred *cred)
fs/nfs/nfs40proc.c
141
.rpc_cred = cred,
fs/nfs/nfs40proc.c
155
const struct cred *cred)
fs/nfs/nfs40proc.c
170
struct page *page, const struct cred *cred)
fs/nfs/nfs40proc.c
194
.rpc_cred = cred,
fs/nfs/nfs40proc.c
220
static int _nfs40_proc_fsid_present(struct inode *inode, const struct cred *cred)
fs/nfs/nfs40proc.c
237
.rpc_cred = cred,
fs/nfs/nfs42proc.c
648
.rpc_cred = ctx->cred,
fs/nfs/nfs42proc.c
694
.rpc_cred = ctx->cred,
fs/nfs/nfs4_fs.h
121
const struct cred *so_cred; /* Associated cred */
fs/nfs/nfs4_fs.h
229
int (*establish_clid)(struct nfs_client *, const struct cred *);
fs/nfs/nfs4_fs.h
230
int (*reclaim_complete)(struct nfs_client *, const struct cred *);
fs/nfs/nfs4_fs.h
232
const struct cred *);
fs/nfs/nfs4_fs.h
261
const struct cred *cred;
fs/nfs/nfs4_fs.h
271
int (*sched_state_renewal)(struct nfs_client *, const struct cred *, unsigned);
fs/nfs/nfs4_fs.h
272
const struct cred * (*get_state_renewal_cred)(struct nfs_client *);
fs/nfs/nfs4_fs.h
273
int (*renew_lease)(struct nfs_client *, const struct cred *);
fs/nfs/nfs4_fs.h
278
struct nfs4_fs_locations *, struct page *, const struct cred *);
fs/nfs/nfs4_fs.h
279
int (*fsid_present)(struct inode *, const struct cred *);
fs/nfs/nfs4_fs.h
325
extern int nfs4_proc_setclientid(struct nfs_client *, u32, unsigned short, const struct cred *, struct nfs4_setclientid_res *);
fs/nfs/nfs4_fs.h
326
extern int nfs4_proc_setclientid_confirm(struct nfs_client *, struct nfs4_setclientid_res *arg, const struct cred *);
fs/nfs/nfs4_fs.h
330
extern int nfs4_proc_bind_conn_to_session(struct nfs_client *, const struct cred *cred);
fs/nfs/nfs4_fs.h
331
extern int nfs4_proc_exchange_id(struct nfs_client *clp, const struct cred *cred);
fs/nfs/nfs4_fs.h
333
extern int nfs4_init_clientid(struct nfs_client *, const struct cred *);
fs/nfs/nfs4_fs.h
334
extern int nfs41_init_clientid(struct nfs_client *, const struct cred *);
fs/nfs/nfs4_fs.h
341
struct page *page, const struct cred *);
fs/nfs/nfs4_fs.h
342
extern int nfs4_proc_fsid_present(struct inode *, const struct cred *);
fs/nfs/nfs4_fs.h
385
extern int nfs4_proc_create_session(struct nfs_client *, const struct cred *);
fs/nfs/nfs4_fs.h
386
extern int nfs4_proc_destroy_session(struct nfs4_session *, const struct cred *);
fs/nfs/nfs4_fs.h
485
const struct cred *nfs4_get_clid_cred(struct nfs_client *clp);
fs/nfs/nfs4_fs.h
486
const struct cred *nfs4_get_machine_cred(struct nfs_client *clp);
fs/nfs/nfs4_fs.h
487
const struct cred *nfs4_get_renew_cred(struct nfs_client *clp);
fs/nfs/nfs4_fs.h
491
struct nfs_client **, const struct cred *);
fs/nfs/nfs4_fs.h
493
struct nfs_client **, const struct cred *);
fs/nfs/nfs4_fs.h
499
extern struct nfs4_state_owner *nfs4_get_state_owner(struct nfs_server *, const struct cred *, gfp_t);
fs/nfs/nfs4_fs.h
526
const struct cred **);
fs/nfs/nfs4_fs.h
74
nfs4_stateid *, const struct cred *);
fs/nfs/nfs4client.c
1037
server->cred = get_cred(fc->cred);
fs/nfs/nfs4client.c
1085
server->cred = get_cred(parent_server->cred);
fs/nfs/nfs4client.c
592
const struct cred *cred)
fs/nfs/nfs4client.c
728
cl_init->cred = server->cred;
fs/nfs/nfs4client.c
808
.cred = mds_srv->cred,
fs/nfs/nfs4file.c
362
sp = nfs4_get_state_owner(server, ctx->cred, GFP_KERNEL);
fs/nfs/nfs4idmap.c
199
struct cred *cred;
fs/nfs/nfs4idmap.c
206
cred = prepare_kernel_cred(&init_task);
fs/nfs/nfs4idmap.c
207
if (!cred)
fs/nfs/nfs4idmap.c
211
GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred,
fs/nfs/nfs4idmap.c
229
cred->thread_keyring = keyring;
fs/nfs/nfs4idmap.c
230
cred->jit_keyring = KEY_REQKEY_DEFL_THREAD_KEYRING;
fs/nfs/nfs4idmap.c
231
id_resolver_cache = cred;
fs/nfs/nfs4idmap.c
239
put_cred(cred);
fs/nfs/nfs4idmap.c
58
static const struct cred *id_resolver_cache;
fs/nfs/nfs4namespace.c
225
struct rpc_cred *cred;
fs/nfs/nfs4namespace.c
236
cred = rpcauth_lookupcred(new->cl_auth, 0);
fs/nfs/nfs4namespace.c
237
if (IS_ERR(cred)) {
fs/nfs/nfs4namespace.c
241
put_rpccred(cred);
fs/nfs/nfs4proc.c
10008
.rpc_cred = data->cred,
fs/nfs/nfs4proc.c
10080
const struct cred *cred = NULL;
fs/nfs/nfs4proc.c
10086
cred = nfs4_get_clid_cred(clp);
fs/nfs/nfs4proc.c
10087
msg.rpc_cred = cred;
fs/nfs/nfs4proc.c
10094
put_cred(cred);
fs/nfs/nfs4proc.c
10208
const struct cred *cred)
fs/nfs/nfs4proc.c
10219
.rpc_cred = cred,
fs/nfs/nfs4proc.c
10269
const struct cred *cred)
fs/nfs/nfs4proc.c
10276
err = _nfs41_test_stateid(server, stateid, cred);
fs/nfs/nfs4proc.c
103
const struct cred *cred,
fs/nfs/nfs4proc.c
10337
const struct cred *cred,
fs/nfs/nfs4proc.c
10342
.rpc_cred = cred,
fs/nfs/nfs4proc.c
10384
const struct cred *cred = lsp->ls_state->owner->so_cred;
fs/nfs/nfs4proc.c
10386
nfs41_free_stateid(server, &lsp->ls_stateid, cred, false);
fs/nfs/nfs4proc.c
107
const struct cred *);
fs/nfs/nfs4proc.c
109
const struct cred *, bool);
fs/nfs/nfs4proc.c
1953
nfs4_process_delegation(struct inode *inode, const struct cred *cred,
fs/nfs/nfs4proc.c
1975
nfs_inode_reclaim_delegation(inode, cred, delegation->type,
fs/nfs/nfs4proc.c
1981
nfs_inode_set_delegation(inode, cred, delegation->type,
fs/nfs/nfs4proc.c
2675
static int nfs4_opendata_access(const struct cred *cred,
fs/nfs/nfs4proc.c
2698
nfs_access_add_cache(state->inode, &cache, cred);
fs/nfs/nfs4proc.c
2831
nfs4_stateid *stateid, const struct cred *cred)
fs/nfs/nfs4proc.c
2846
status = nfs41_test_stateid(server, stateid, cred);
fs/nfs/nfs4proc.c
2857
nfs41_free_stateid(server, stateid, cred, true);
fs/nfs/nfs4proc.c
2866
const struct cred *cred = NULL;
fs/nfs/nfs4proc.c
2888
if (delegation->cred)
fs/nfs/nfs4proc.c
2889
cred = get_cred(delegation->cred);
fs/nfs/nfs4proc.c
2892
status = nfs41_test_and_free_expired_stateid(server, &stateid, cred);
fs/nfs/nfs4proc.c
2899
put_cred(cred);
fs/nfs/nfs4proc.c
2936
const struct cred *cred = lsp->ls_state->owner->so_cred;
fs/nfs/nfs4proc.c
2946
cred);
fs/nfs/nfs4proc.c
2980
const struct cred *cred = state->owner->so_cred;
fs/nfs/nfs4proc.c
2985
status = nfs41_test_and_free_expired_stateid(server, stateid, cred);
fs/nfs/nfs4proc.c
3147
const struct cred *cred = ctx->cred;
fs/nfs/nfs4proc.c
3157
sp = nfs4_get_state_owner(server, cred, GFP_KERNEL);
fs/nfs/nfs4proc.c
3203
status = nfs4_do_setattr(state->inode, cred,
fs/nfs/nfs4proc.c
3311
const struct cred *cred,
fs/nfs/nfs4proc.c
3319
.rpc_cred = cred,
fs/nfs/nfs4proc.c
3321
const struct cred *delegation_cred = NULL;
fs/nfs/nfs4proc.c
3367
static int nfs4_do_setattr(struct inode *inode, const struct cred *cred,
fs/nfs/nfs4proc.c
3407
err = _nfs4_do_setattr(inode, &arg, &res, cred, ctx);
fs/nfs/nfs4proc.c
4062
xprtdata.cred = nfs4_get_clid_cred(clp);
fs/nfs/nfs4proc.c
4066
if (xprtdata.cred)
fs/nfs/nfs4proc.c
4067
put_cred(xprtdata.cred);
fs/nfs/nfs4proc.c
4094
const struct cred *cred;
fs/nfs/nfs4proc.c
4100
cred = ops->get_state_renewal_cred(clp);
fs/nfs/nfs4proc.c
4101
if (cred == NULL) {
fs/nfs/nfs4proc.c
4102
cred = nfs4_get_clid_cred(clp);
fs/nfs/nfs4proc.c
4103
if (cred == NULL)
fs/nfs/nfs4proc.c
4118
cred);
fs/nfs/nfs4proc.c
412
const struct cred *cred)
fs/nfs/nfs4proc.c
4136
put_cred(cred);
fs/nfs/nfs4proc.c
416
ops->test_and_free_expired(server, stateid, cred);
fs/nfs/nfs4proc.c
421
const struct cred *cred)
fs/nfs/nfs4proc.c
424
nfs4_test_and_free_stateid(server, stateid, cred);
fs/nfs/nfs4proc.c
429
const struct cred *cred)
fs/nfs/nfs4proc.c
434
__nfs4_free_revoked_stateid(server, &tmp, cred);
fs/nfs/nfs4proc.c
4523
const struct cred *cred = NULL;
fs/nfs/nfs4proc.c
4547
cred = ctx->cred;
fs/nfs/nfs4proc.c
4554
status = nfs4_do_setattr(inode, cred, fattr, sattr, ctx, NULL);
fs/nfs/nfs4proc.c
4741
const struct cred *cred)
fs/nfs/nfs4proc.c
4755
.rpc_cred = cred,
fs/nfs/nfs4proc.c
4777
const struct cred *cred)
fs/nfs/nfs4proc.c
4784
err = _nfs4_proc_access(inode, entry, cred);
fs/nfs/nfs4proc.c
5323
.rpc_cred = nr_arg->cred,
fs/nfs/nfs4proc.c
6551
unsigned short port, const struct cred *cred,
fs/nfs/nfs4proc.c
6564
.rpc_cred = cred,
fs/nfs/nfs4proc.c
6625
const struct cred *cred)
fs/nfs/nfs4proc.c
6630
.rpc_cred = cred,
fs/nfs/nfs4proc.c
6802
static int _nfs4_proc_delegreturn(struct inode *inode, const struct cred *cred,
fs/nfs/nfs4proc.c
6812
.rpc_cred = cred,
fs/nfs/nfs4proc.c
6850
cred, issync);
fs/nfs/nfs4proc.c
6891
int nfs4_proc_delegreturn(struct inode *inode, const struct cred *cred,
fs/nfs/nfs4proc.c
6899
err = _nfs4_proc_delegreturn(inode, cred, stateid,
fs/nfs/nfs4proc.c
7154
.rpc_cred = ctx->cred,
fs/nfs/nfs4proc.c
8119
struct page *page, const struct cred *cred)
fs/nfs/nfs4proc.c
8140
.rpc_cred = cred,
fs/nfs/nfs4proc.c
8189
struct page *page, const struct cred *cred)
fs/nfs/nfs4proc.c
8207
cred);
fs/nfs/nfs4proc.c
8222
static int _nfs41_proc_fsid_present(struct inode *inode, const struct cred *cred)
fs/nfs/nfs4proc.c
8235
.rpc_cred = cred,
fs/nfs/nfs4proc.c
8267
int nfs4_proc_fsid_present(struct inode *inode, const struct cred *cred)
fs/nfs/nfs4proc.c
8285
status = ops->fsid_present(inode, cred);
fs/nfs/nfs4proc.c
8329
const struct cred *cred = NULL;
fs/nfs/nfs4proc.c
8335
cred = nfs4_get_clid_cred(clp);
fs/nfs/nfs4proc.c
8336
msg.rpc_cred = cred;
fs/nfs/nfs4proc.c
8347
put_cred(cred);
fs/nfs/nfs4proc.c
839
static void nfs4_probe_sequence(struct nfs_client *client, const struct cred *cred,
fs/nfs/nfs4proc.c
842
struct rpc_task *task = _nfs41_proc_sequence(client, cred, slot, true);
fs/nfs/nfs4proc.c
8447
const struct cred *cred)
fs/nfs/nfs4proc.c
8461
.rpc_cred = cred,
fs/nfs/nfs4proc.c
8510
const struct cred *cred;
fs/nfs/nfs4proc.c
8520
return nfs4_proc_bind_one_conn_to_session(clnt, xprt, p->clp, p->cred);
fs/nfs/nfs4proc.c
8523
int nfs4_proc_bind_conn_to_session(struct nfs_client *clp, const struct cred *cred)
fs/nfs/nfs4proc.c
8527
.cred = cred,
fs/nfs/nfs4proc.c
8689
nfs4_run_exchange_id(struct nfs_client *clp, const struct cred *cred,
fs/nfs/nfs4proc.c
8694
.rpc_cred = cred,
fs/nfs/nfs4proc.c
8787
static int _nfs4_proc_exchange_id(struct nfs_client *clp, const struct cred *cred,
fs/nfs/nfs4proc.c
8796
task = nfs4_run_exchange_id(clp, cred, sp4_how, NULL);
fs/nfs/nfs4proc.c
8858
int nfs4_proc_exchange_id(struct nfs_client *clp, const struct cred *cred)
fs/nfs/nfs4proc.c
8866
status = _nfs4_proc_exchange_id(clp, cred, SP4_MACH_CRED);
fs/nfs/nfs4proc.c
8872
return _nfs4_proc_exchange_id(clp, cred, SP4_NONE);
fs/nfs/nfs4proc.c
8906
task = nfs4_run_exchange_id(adata->clp, adata->cred, sp4_how, xprt);
fs/nfs/nfs4proc.c
8932
const struct cred *cred)
fs/nfs/nfs4proc.c
8937
.rpc_cred = cred,
fs/nfs/nfs4proc.c
8951
const struct cred *cred)
fs/nfs/nfs4proc.c
8957
ret = _nfs4_proc_destroy_clientid(clp, cred);
fs/nfs/nfs4proc.c
8972
const struct cred *cred;
fs/nfs/nfs4proc.c
8981
cred = nfs4_get_clid_cred(clp);
fs/nfs/nfs4proc.c
8982
ret = nfs4_proc_destroy_clientid(clp, cred);
fs/nfs/nfs4proc.c
8983
put_cred(cred);
fs/nfs/nfs4proc.c
9188
const struct cred *cred)
fs/nfs/nfs4proc.c
9203
.rpc_cred = cred,
fs/nfs/nfs4proc.c
9241
int nfs4_proc_create_session(struct nfs_client *clp, const struct cred *cred)
fs/nfs/nfs4proc.c
9256
status = _nfs4_proc_create_session(clp, cred);
fs/nfs/nfs4proc.c
9279
const struct cred *cred)
fs/nfs/nfs4proc.c
9284
.rpc_cred = cred,
fs/nfs/nfs4proc.c
9377
const struct cred *cred,
fs/nfs/nfs4proc.c
9384
.rpc_cred = cred,
fs/nfs/nfs4proc.c
9420
static int nfs41_proc_async_sequence(struct nfs_client *clp, const struct cred *cred, unsigned renew_flags)
fs/nfs/nfs4proc.c
9427
task = _nfs41_proc_sequence(clp, cred, NULL, false);
fs/nfs/nfs4proc.c
9436
static int nfs4_proc_sequence(struct nfs_client *clp, const struct cred *cred)
fs/nfs/nfs4proc.c
9441
task = _nfs41_proc_sequence(clp, cred, NULL, true);
fs/nfs/nfs4proc.c
9531
const struct cred *cred)
fs/nfs/nfs4proc.c
9536
.rpc_cred = cred,
fs/nfs/nfs4proc.c
9703
.rpc_cred = lgp->cred,
fs/nfs/nfs4proc.c
9840
put_cred(lrp->cred);
fs/nfs/nfs4proc.c
9858
.rpc_cred = lrp->cred,
fs/nfs/nfs4proc.c
9899
const struct cred *cred)
fs/nfs/nfs4proc.c
99
static int nfs4_do_setattr(struct inode *inode, const struct cred *cred,
fs/nfs/nfs4proc.c
9913
.rpc_cred = cred,
fs/nfs/nfs4proc.c
9932
const struct cred *cred)
fs/nfs/nfs4proc.c
9939
_nfs4_proc_getdeviceinfo(server, pdev, cred),
fs/nfs/nfs4proc.c
9990
put_cred(data->cred);
fs/nfs/nfs4renewd.c
60
const struct cred *cred;
fs/nfs/nfs4renewd.c
81
cred = ops->get_state_renewal_cred(clp);
fs/nfs/nfs4renewd.c
82
if (cred == NULL) {
fs/nfs/nfs4renewd.c
92
ret = ops->sched_state_renewal(clp, cred, renew_flags);
fs/nfs/nfs4renewd.c
93
put_cred(cred);
fs/nfs/nfs4session.c
582
const struct cred *cred;
fs/nfs/nfs4session.c
584
cred = nfs4_get_clid_cred(session->clp);
fs/nfs/nfs4session.c
585
nfs4_proc_destroy_session(session, cred);
fs/nfs/nfs4session.c
586
put_cred(cred);
fs/nfs/nfs4state.c
114
int nfs4_init_clientid(struct nfs_client *clp, const struct cred *cred)
fs/nfs/nfs4state.c
130
status = nfs4_proc_setclientid(clp, NFS4_CALLBACK, port, cred, &clid);
fs/nfs/nfs4state.c
137
status = nfs4_proc_setclientid_confirm(clp, &clid, cred);
fs/nfs/nfs4state.c
146
const struct cred *nfs4_get_machine_cred(struct nfs_client *clp)
fs/nfs/nfs4state.c
159
static const struct cred *
fs/nfs/nfs4state.c
162
const struct cred *cred = NULL;
fs/nfs/nfs4state.c
172
cred = get_cred(sp->so_cred);
fs/nfs/nfs4state.c
1727
const struct cred *cred)
fs/nfs/nfs4state.c
1731
return ops->reclaim_complete(clp, cred);
fs/nfs/nfs4state.c
175
return cred;
fs/nfs/nfs4state.c
1778
const struct cred *cred;
fs/nfs/nfs4state.c
1785
cred = nfs4_get_clid_cred(clp);
fs/nfs/nfs4state.c
1786
err = nfs4_reclaim_complete(clp, ops, cred);
fs/nfs/nfs4state.c
1787
put_cred(cred);
fs/nfs/nfs4state.c
185
const struct cred *nfs4_get_renew_cred(struct nfs_client *clp)
fs/nfs/nfs4state.c
187
const struct cred *cred = NULL;
fs/nfs/nfs4state.c
1899
const struct cred *cred;
fs/nfs/nfs4state.c
1907
cred = ops->get_state_renewal_cred(clp);
fs/nfs/nfs4state.c
1908
if (cred == NULL) {
fs/nfs/nfs4state.c
1909
cred = nfs4_get_clid_cred(clp);
fs/nfs/nfs4state.c
191
cred = nfs4_get_machine_cred(clp);
fs/nfs/nfs4state.c
1911
if (cred == NULL)
fs/nfs/nfs4state.c
1914
status = ops->renew_lease(clp, cred);
fs/nfs/nfs4state.c
1915
put_cred(cred);
fs/nfs/nfs4state.c
192
if (cred != NULL)
fs/nfs/nfs4state.c
198
cred = nfs4_get_renew_cred_server_locked(server);
fs/nfs/nfs4state.c
1984
const struct cred *cred;
fs/nfs/nfs4state.c
199
if (cred != NULL)
fs/nfs/nfs4state.c
1992
cred = nfs4_get_clid_cred(clp);
fs/nfs/nfs4state.c
1993
if (cred == NULL)
fs/nfs/nfs4state.c
1995
status = ops->establish_clid(clp, cred);
fs/nfs/nfs4state.c
1996
put_cred(cred);
fs/nfs/nfs4state.c
2042
static int nfs4_try_migration(struct nfs_server *server, const struct cred *cred)
fs/nfs/nfs4state.c
206
return cred;
fs/nfs/nfs4state.c
2068
page, cred);
fs/nfs/nfs4state.c
2123
const struct cred *cred;
fs/nfs/nfs4state.c
2128
cred = ops->get_state_renewal_cred(clp);
fs/nfs/nfs4state.c
2129
if (cred == NULL)
fs/nfs/nfs4state.c
2147
status = nfs4_try_migration(server, cred);
fs/nfs/nfs4state.c
2149
put_cred(cred);
fs/nfs/nfs4state.c
2155
put_cred(cred);
fs/nfs/nfs4state.c
2169
const struct cred *cred;
fs/nfs/nfs4state.c
2174
cred = ops->get_state_renewal_cred(clp);
fs/nfs/nfs4state.c
2175
if (cred == NULL)
fs/nfs/nfs4state.c
2192
status = nfs4_proc_fsid_present(inode, cred);
fs/nfs/nfs4state.c
2195
if (nfs4_try_migration(server, cred) == -NFS4ERR_LEASE_MOVED)
fs/nfs/nfs4state.c
2202
put_cred(cred);
fs/nfs/nfs4state.c
2225
const struct cred *cred;
fs/nfs/nfs4state.c
2236
cred = nfs4_get_clid_cred(clp);
fs/nfs/nfs4state.c
2237
if (cred == NULL)
fs/nfs/nfs4state.c
2240
status = ops->detect_trunking(clp, result, cred);
fs/nfs/nfs4state.c
2241
put_cred(cred);
fs/nfs/nfs4state.c
2430
const struct cred *cred;
fs/nfs/nfs4state.c
2438
cred = nfs4_get_clid_cred(clp);
fs/nfs/nfs4state.c
2439
status = nfs4_proc_destroy_session(clp->cl_session, cred);
fs/nfs/nfs4state.c
2457
status = nfs4_proc_create_session(clp, cred);
fs/nfs/nfs4state.c
2468
put_cred(cred);
fs/nfs/nfs4state.c
2474
const struct cred *cred;
fs/nfs/nfs4state.c
2482
cred = nfs4_get_clid_cred(clp);
fs/nfs/nfs4state.c
2483
ret = nfs4_proc_bind_conn_to_session(clp, cred);
fs/nfs/nfs4state.c
2484
put_cred(cred);
fs/nfs/nfs4state.c
271
int nfs41_init_clientid(struct nfs_client *clp, const struct cred *cred)
fs/nfs/nfs4state.c
277
status = nfs4_proc_exchange_id(clp, cred);
fs/nfs/nfs4state.c
282
status = nfs4_proc_create_session(clp, cred);
fs/nfs/nfs4state.c
308
const struct cred *cred)
fs/nfs/nfs4state.c
312
status = nfs4_proc_exchange_id(clp, cred);
fs/nfs/nfs4state.c
316
status = nfs41_walk_client_list(clp, result, cred);
fs/nfs/nfs4state.c
346
const struct cred *nfs4_get_clid_cred(struct nfs_client *clp)
fs/nfs/nfs4state.c
348
const struct cred *cred;
fs/nfs/nfs4state.c
350
cred = nfs4_get_machine_cred(clp);
fs/nfs/nfs4state.c
351
return cred;
fs/nfs/nfs4state.c
355
nfs4_find_state_owner_locked(struct nfs_server *server, const struct cred *cred)
fs/nfs/nfs4state.c
365
cmp = cred_fscmp(cred, sp->so_cred);
fs/nfs/nfs4state.c
444
const struct cred *cred,
fs/nfs/nfs4state.c
454
sp->so_cred = get_cred(cred);
fs/nfs/nfs4state.c
520
const struct cred *cred,
fs/nfs/nfs4state.c
527
sp = nfs4_find_state_owner_locked(server, cred);
fs/nfs/nfs4state.c
531
new = nfs4_alloc_state_owner(server, cred, gfp_flags);
fs/nfs/nfs4state.c
983
nfs4_stateid *dst, const struct cred **cred)
fs/nfs/nfs4state.c
989
if (cred != NULL)
fs/nfs/nfs4state.c
990
*cred = NULL;
fs/nfs/nfs4state.c
996
if (nfs4_copy_delegation_stateid(state->inode, fmode, dst, cred)) {
fs/nfs/pagelist.c
104
hdr->cred = nfs_req_openctx(hdr->req)->cred;
fs/nfs/pagelist.c
734
const struct cred *cred, const struct nfs_rpc_ops *rpc_ops,
fs/nfs/pagelist.c
742
.rpc_cred = cred,
fs/nfs/pagelist.c
966
nfs_local_open_fh(clp, hdr->cred, hdr->args.fh,
fs/nfs/pagelist.c
974
hdr->cred,
fs/nfs/pnfs.c
1051
pnfs_set_layout_cred(struct pnfs_layout_hdr *lo, const struct cred *cred)
fs/nfs/pnfs.c
1053
const struct cred *old;
fs/nfs/pnfs.c
1055
if (cred && cred_fscmp(lo->plh_lc_cred, cred) != 0) {
fs/nfs/pnfs.c
1056
old = xchg(&lo->plh_lc_cred, get_cred(cred));
fs/nfs/pnfs.c
1064
const struct cred *cred, bool update_barrier)
fs/nfs/pnfs.c
1070
pnfs_set_layout_cred(lo, cred);
fs/nfs/pnfs.c
1219
lgp->cred = ctx->cred;
fs/nfs/pnfs.c
1305
const struct cred **cred,
fs/nfs/pnfs.c
1316
*cred = get_cred(lo->plh_lc_cred);
fs/nfs/pnfs.c
1349
const struct cred **pcred,
fs/nfs/pnfs.c
1356
const struct cred *cred = *pcred;
fs/nfs/pnfs.c
1366
put_cred(cred);
fs/nfs/pnfs.c
1374
lrp->cred = cred;
fs/nfs/pnfs.c
1403
const struct cred *cred;
fs/nfs/pnfs.c
1408
send = pnfs_prepare_layoutreturn(lo, &stateid, &cred, &iomode);
fs/nfs/pnfs.c
1412
pnfs_send_layoutreturn(lo, &stateid, &cred, iomode,
fs/nfs/pnfs.c
1438
const struct cred *cred;
fs/nfs/pnfs.c
1477
send = pnfs_prepare_layoutreturn(lo, &stateid, &cred, NULL);
fs/nfs/pnfs.c
1480
status = pnfs_send_layoutreturn(lo, &stateid, &cred, IOMODE_ANY,
fs/nfs/pnfs.c
1522
const struct cred *cred;
fs/nfs/pnfs.c
1529
cred = get_cred(lo->plh_lc_cred);
fs/nfs/pnfs.c
1533
return pnfs_send_layoutreturn(lo, &zero_stateid, &cred, IOMODE_ANY,
fs/nfs/pnfs.c
1538
struct nfs4_layoutreturn_res *res, const struct cred *cred,
fs/nfs/pnfs.c
1546
const struct cred *lc_cred;
fs/nfs/pnfs.c
1643
if (!layoutreturn || cred_fscmp(cred, lc_cred) != 0)
fs/nfs/pnfs.c
1893
lo->plh_lc_cred = get_cred(ctx->cred);
fs/nfs/pnfs.c
2602
pnfs_set_layout_stateid(lo, &res->stateid, lgp->cred, false);
fs/nfs/pnfs.c
2616
pnfs_set_layout_stateid(lo, &res->stateid, lgp->cred, true);
fs/nfs/pnfs.c
2719
const struct cred *cred;
fs/nfs/pnfs.c
2723
return_now = pnfs_prepare_layoutreturn(lo, &stateid, &cred, &iomode);
fs/nfs/pnfs.c
2726
pnfs_send_layoutreturn(lo, &stateid, &cred, iomode,
fs/nfs/pnfs.c
2811
const struct cred *cred;
fs/nfs/pnfs.c
2834
!pnfs_prepare_layoutreturn(lo, &stateid, &cred, &iomode)) {
fs/nfs/pnfs.c
2843
pnfs_send_layoutreturn(lo, &stateid, &cred, iomode,
fs/nfs/pnfs.c
3397
data->cred = get_cred(nfsi->layout->plh_lc_cred);
fs/nfs/pnfs.c
3414
put_cred(data->cred);
fs/nfs/pnfs.h
219
const struct cred *plh_lc_cred; /* layoutcommit cred */
fs/nfs/pnfs.h
255
const struct cred *cred);
fs/nfs/pnfs.h
294
const struct cred *cred,
fs/nfs/pnfs.h
307
struct nfs4_layoutreturn_res *res, const struct cred *cred,
fs/nfs/pnfs.h
380
const struct nfs4_deviceid *id, const struct cred *cred,
fs/nfs/pnfs.h
778
const struct cred *cred, bool sync)
fs/nfs/pnfs_dev.c
139
rc = nfs4_proc_getdeviceinfo(server, pdev, cred);
fs/nfs/pnfs_dev.c
186
const struct nfs4_deviceid *id, const struct cred *cred,
fs/nfs/pnfs_dev.c
196
new = nfs4_get_device_info(server, id, cred, gfp_mask);
fs/nfs/pnfs_dev.c
99
const struct cred *cred, gfp_t gfp_flags)
fs/nfs/pnfs_nfs.c
960
xprtdata.cred = nfs4_get_clid_cred(clp);
fs/nfs/pnfs_nfs.c
964
if (xprtdata.cred)
fs/nfs/pnfs_nfs.c
965
put_cred(xprtdata.cred);
fs/nfs/proc.c
521
.rpc_cred = nr_arg->cred,
fs/nfs/unlink.c
186
data->cred = get_current_cred();
fs/nfs/unlink.c
207
put_cred(data->cred);
fs/nfs/unlink.c
313
put_cred(data->cred);
fs/nfs/unlink.c
34
put_cred(data->cred);
fs/nfs/unlink.c
364
data->cred = get_current_cred();
fs/nfs/unlink.c
368
msg.rpc_cred = data->cred;
fs/nfs/unlink.c
94
.rpc_cred = data->cred,
fs/nfs/write.c
1175
struct rpc_cred *cred, *new, *old = NULL;
fs/nfs/write.c
1177
.cred = ctx->cred,
fs/nfs/write.c
1182
cred = rcu_dereference(ctx->ll_cred);
fs/nfs/write.c
1183
if (cred && !(cred->cr_ops->crkey_timeout &&
fs/nfs/write.c
1184
cred->cr_ops->crkey_timeout(cred)))
fs/nfs/write.c
1189
if (new == cred) {
fs/nfs/write.c
1636
.rpc_cred = data->cred,
fs/nfs/write.c
1706
data->cred = ctx->cred;
fs/nfs/write.c
1778
localio = nfs_local_open_fh(NFS_SERVER(inode)->nfs_client, data->cred,
fs/nfs_common/nfslocalio.c
266
struct rpc_clnt *rpc_clnt, const struct cred *cred,
fs/nfs_common/nfslocalio.c
292
localio = nfs_to->nfsd_open_local_fh(net, uuid->dom, rpc_clnt, cred,
fs/nfsd/auth.c
14
if (f->pseudoflavor == cred->cr_flavor)
fs/nfsd/auth.c
21
int nfsd_setuser(struct svc_cred *cred, struct svc_export *exp)
fs/nfsd/auth.c
25
struct cred *new;
fs/nfsd/auth.c
27
int flags = nfsexp_flags(cred, exp);
fs/nfsd/auth.c
35
new->fsuid = cred->cr_uid;
fs/nfsd/auth.c
36
new->fsgid = cred->cr_gid;
fs/nfsd/auth.c
38
rqgi = cred->cr_group_info;
fs/nfsd/auth.c
8
int nfsexp_flags(struct svc_cred *cred, struct svc_export *exp)
fs/nfsd/auth.h
15
int nfsd_setuser(struct svc_cred *cred, struct svc_export *exp);
fs/nfsd/export.h
104
int nfsexp_flags(struct svc_cred *cred, struct svc_export *exp);
fs/nfsd/filecache.c
1008
if (!nfsd_match_cred(nf->nf_cred, cred))
fs/nfsd/filecache.c
1085
struct svc_cred *cred,
fs/nfsd/filecache.c
1104
status = fh_verify_local(net, cred, client, fhp, type,
fs/nfsd/filecache.c
1308
nfsd_file_acquire_local(struct net *net, struct svc_cred *cred,
fs/nfsd/filecache.c
1317
const struct cred *save_cred = get_current_cred();
fs/nfsd/filecache.c
1320
beres = nfsd_file_do_acquire(NULL, net, cred, client, fhp, may_flags,
fs/nfsd/filecache.c
80
nfsd_match_cred(const struct cred *c1, const struct cred *c2)
fs/nfsd/filecache.c
994
nfsd_file_lookup_locked(const struct net *net, const struct cred *cred,
fs/nfsd/filecache.h
41
const struct cred *nf_cred;
fs/nfsd/filecache.h
82
__be32 nfsd_file_acquire_local(struct net *net, struct svc_cred *cred,
fs/nfsd/localio.c
48
struct rpc_clnt *rpc_clnt, const struct cred *cred,
fs/nfsd/localio.c
80
svcauth_map_clnt_to_svc_cred_local(rpc_clnt, cred, &rq_cred);
fs/nfsd/nfs4callback.c
1121
static const struct cred *get_backchannel_cred(struct nfs4_client *clp, struct rpc_clnt *client, struct nfsd4_session *ses)
fs/nfsd/nfs4callback.c
1129
struct cred *kcred;
fs/nfsd/nfs4callback.c
1158
.cred = current_cred(),
fs/nfsd/nfs4callback.c
1161
const struct cred *cred;
fs/nfsd/nfs4callback.c
1190
cred = get_backchannel_cred(clp, client, ses);
fs/nfsd/nfs4callback.c
1191
if (!cred) {
fs/nfsd/nfs4callback.c
1200
clp->cl_cb_cred = cred;
fs/nfsd/nfs4recover.c
125
const struct cred *original_cred;
fs/nfsd/nfs4recover.c
218
const struct cred *original_cred;
fs/nfsd/nfs4recover.c
297
const struct cred *original_cred;
fs/nfsd/nfs4recover.c
434
const struct cred *original_cred;
fs/nfsd/nfs4recover.c
76
nfs4_save_creds(const struct cred **original_creds)
fs/nfsd/nfs4recover.c
78
struct cred *new;
fs/nfsd/nfs4recover.c
91
nfs4_reset_creds(const struct cred *original)
fs/nfsd/nfsctl.c
724
static ssize_t __write_ports_addfd(char *buf, struct net *net, const struct cred *cred)
fs/nfsd/nfsctl.c
741
err = svc_addsock(serv, net, fd, buf, SIMPLE_TRANSACTION_LIMIT, cred);
fs/nfsd/nfsctl.c
753
static ssize_t __write_ports_addxprt(char *buf, struct net *net, const struct cred *cred)
fs/nfsd/nfsctl.c
774
PF_INET, port, SVC_SOCK_ANONYMOUS, cred);
fs/nfsd/nfsctl.c
779
PF_INET6, port, SVC_SOCK_ANONYMOUS, cred);
fs/nfsd/nfsd.h
178
const struct cred *cred = rqstp->rq_xprt->xpt_cred;
fs/nfsd/nfsd.h
179
return cred ? cred->user_ns : &init_user_ns;
fs/nfsd/nfsd.h
99
const struct cred *cred, const char *scope);
fs/nfsd/nfsfh.c
103
struct svc_cred *cred,
fs/nfsd/nfsfh.c
107
if (rqstp && !nfsd_originating_port_ok(rqstp, cred, exp)) {
fs/nfsd/nfsfh.c
115
return nfserrno(nfsd_setuser(cred, exp));
fs/nfsd/nfsfh.c
146
struct svc_cred *cred,
fs/nfsd/nfsfh.c
218
struct cred *new = prepare_creds();
fs/nfsd/nfsfh.c
228
error = nfsd_setuser_and_check_port(rqstp, cred, exp);
fs/nfsd/nfsfh.c
317
struct net *net, struct svc_cred *cred,
fs/nfsd/nfsfh.c
329
error = nfsd_set_fh_dentry(rqstp, net, cred, client,
fs/nfsd/nfsfh.c
359
error = nfsd_setuser_and_check_port(rqstp, cred, exp);
fs/nfsd/nfsfh.c
410
error = nfsd_permission(cred, exp, dentry, access);
fs/nfsd/nfsfh.c
433
fh_verify_local(struct net *net, struct svc_cred *cred,
fs/nfsd/nfsfh.c
437
return __fh_verify(NULL, net, cred, client, NULL,
fs/nfsd/nfsfh.c
91
struct svc_cred *cred,
fs/nfsd/nfsfh.c
94
if (nfsexp_flags(cred, exp) & NFSEXP_INSECURE_PORT)
fs/nfsd/nfsfh.c
97
if (cred->cr_flavor >= RPC_AUTH_GSS)
fs/nfsd/nfssvc.c
349
static int nfsd_startup_net(struct net *net, const struct cred *cred)
fs/nfsd/nfssvc.c
368
ret = lockd_up(net, cred);
fs/nfsd/nfssvc.c
751
nfsd_svc(int n, int *nthreads, struct net *net, const struct cred *cred, const char *scope)
fs/nfsd/nfssvc.c
769
error = nfsd_startup_net(net, cred);
fs/nfsd/state.h
488
const struct cred *cl_cb_cred;
fs/nfsd/vfs.c
2577
static int exp_rdonly(struct svc_cred *cred, struct svc_export *exp)
fs/nfsd/vfs.c
2579
return nfsexp_flags(cred, exp) & NFSEXP_READONLY;
fs/nfsd/vfs.c
2823
nfsd_permission(struct svc_cred *cred, struct svc_export *exp,
fs/nfsd/vfs.c
2855
if (exp_rdonly(cred, exp) ||
fs/nfsd/vfs.h
160
__be32 nfsd_permission(struct svc_cred *cred, struct svc_export *exp,
fs/open.c
1094
const struct cred *cred)
fs/open.c
1102
f = alloc_empty_file(flags, cred);
fs/open.c
1115
const struct cred *cred)
fs/open.c
1117
struct file *f = alloc_empty_file(flags, cred);
fs/open.c
1144
const struct cred *cred)
fs/open.c
1149
f = alloc_empty_file_noaccount(flags, cred);
fs/open.c
391
const struct cred *cred;
fs/open.c
396
cred = current_cred();
fs/open.c
397
if (!uid_eq(cred->fsuid, cred->uid) ||
fs/open.c
398
!gid_eq(cred->fsgid, cred->gid))
fs/open.c
402
kuid_t root_uid = make_kuid(cred->user_ns, 0);
fs/open.c
403
if (!uid_eq(cred->uid, root_uid)) {
fs/open.c
404
if (!cap_isclear(cred->cap_effective))
fs/open.c
407
if (!cap_isidentical(cred->cap_effective,
fs/open.c
408
cred->cap_permitted))
fs/open.c
416
static const struct cred *access_override_creds(void)
fs/open.c
418
struct cred *override_cred;
fs/open.c
471
const struct cred *old_cred = NULL;
fs/overlayfs/copy_up.c
727
static const struct cred *ovl_prepare_copy_up_creds(struct dentry *dentry)
fs/overlayfs/copy_up.c
729
struct cred *copy_up_cred = NULL;
fs/overlayfs/copy_up.c
742
static void ovl_revert_copy_up_creds(const struct cred *orig_cred)
fs/overlayfs/copy_up.c
744
const struct cred *copy_up_cred;
fs/overlayfs/copy_up.c
750
DEFINE_CLASS(copy_up_creds, const struct cred *,
fs/overlayfs/dir.c
1372
scoped_class(ovl_override_creator_creds, cred, original_creds, dentry, inode, mode) {
fs/overlayfs/dir.c
1373
if (IS_ERR(cred))
fs/overlayfs/dir.c
1374
return PTR_ERR(cred);
fs/overlayfs/dir.c
584
static const struct cred *ovl_override_creator_creds(const struct cred *original_creds,
fs/overlayfs/dir.c
589
if (WARN_ON_ONCE(current->cred != ovl_creds(dentry->d_sb)))
fs/overlayfs/dir.c
607
static void ovl_revert_creator_creds(const struct cred *old_cred)
fs/overlayfs/dir.c
609
const struct cred *override_cred;
fs/overlayfs/dir.c
616
const struct cred *,
fs/overlayfs/dir.c
619
const struct cred *original_creds,
fs/overlayfs/dir.c
668
scoped_class(ovl_override_creator_creds, cred, original_creds, dentry, inode, attr->mode) {
fs/overlayfs/dir.c
669
if (IS_ERR(cred))
fs/overlayfs/dir.c
670
return PTR_ERR(cred);
fs/overlayfs/file.c
328
.cred = ovl_creds(file_inode(file)->i_sb),
fs/overlayfs/file.c
351
.cred = ovl_creds(inode->i_sb),
fs/overlayfs/file.c
385
.cred = ovl_creds(file_inode(in)->i_sb),
fs/overlayfs/file.c
417
.cred = ovl_creds(inode->i_sb),
fs/overlayfs/file.c
472
.cred = ovl_creds(file_inode(file)->i_sb),
fs/overlayfs/overlayfs.h
463
const struct cred *ovl_override_creds(struct super_block *sb);
fs/overlayfs/overlayfs.h
470
static inline const struct cred *ovl_creds(struct super_block *sb)
fs/overlayfs/ovl_entry.h
74
const struct cred *creator_cred;
fs/overlayfs/params.c
697
const struct cred *cred = NULL;
fs/overlayfs/params.c
700
swap(cred, ofs->creator_cred);
fs/overlayfs/params.c
701
put_cred(cred);
fs/overlayfs/params.c
710
cred = prepare_creds();
fs/overlayfs/params.c
711
if (cred)
fs/overlayfs/params.c
712
swap(cred, ofs->creator_cred);
fs/overlayfs/params.c
716
put_cred(cred);
fs/overlayfs/super.c
1378
struct cred *creator_cred = (struct cred *)ofs->creator_cred;
fs/overlayfs/util.c
65
const struct cred *ovl_override_creds(struct super_block *sb)
fs/pidfs.c
345
const struct cred *c;
fs/proc/array.c
156
const struct cred *cred;
fs/proc/array.c
168
cred = get_task_cred(p);
fs/proc/array.c
188
seq_put_decimal_ull(m, "\nUid:\t", from_kuid_munged(user_ns, cred->uid));
fs/proc/array.c
189
seq_put_decimal_ull(m, "\t", from_kuid_munged(user_ns, cred->euid));
fs/proc/array.c
190
seq_put_decimal_ull(m, "\t", from_kuid_munged(user_ns, cred->suid));
fs/proc/array.c
191
seq_put_decimal_ull(m, "\t", from_kuid_munged(user_ns, cred->fsuid));
fs/proc/array.c
192
seq_put_decimal_ull(m, "\nGid:\t", from_kgid_munged(user_ns, cred->gid));
fs/proc/array.c
193
seq_put_decimal_ull(m, "\t", from_kgid_munged(user_ns, cred->egid));
fs/proc/array.c
194
seq_put_decimal_ull(m, "\t", from_kgid_munged(user_ns, cred->sgid));
fs/proc/array.c
195
seq_put_decimal_ull(m, "\t", from_kgid_munged(user_ns, cred->fsgid));
fs/proc/array.c
199
group_info = cred->group_info;
fs/proc/array.c
203
put_cred(cred);
fs/proc/array.c
312
const struct cred *cred;
fs/proc/array.c
317
cred = __task_cred(p);
fs/proc/array.c
318
cap_inheritable = cred->cap_inheritable;
fs/proc/array.c
319
cap_permitted = cred->cap_permitted;
fs/proc/array.c
320
cap_effective = cred->cap_effective;
fs/proc/array.c
321
cap_bset = cred->cap_bset;
fs/proc/array.c
322
cap_ambient = cred->cap_ambient;
fs/proc/base.c
1881
const struct cred *cred;
fs/proc/base.c
1893
cred = __task_cred(task);
fs/proc/base.c
1894
uid = cred->euid;
fs/proc/base.c
1895
gid = cred->egid;
fs/resctrl/rdtgroup.c
721
const struct cred *tcred = get_task_cred(task);
fs/resctrl/rdtgroup.c
722
const struct cred *cred = current_cred();
fs/resctrl/rdtgroup.c
729
if (!uid_eq(cred->euid, GLOBAL_ROOT_UID) &&
fs/resctrl/rdtgroup.c
730
!uid_eq(cred->euid, tcred->uid) &&
fs/resctrl/rdtgroup.c
731
!uid_eq(cred->euid, tcred->suid)) {
fs/smb/client/cifs_spnego.c
180
struct cred *cred;
fs/smb/client/cifs_spnego.c
192
cred = prepare_kernel_cred(&init_task);
fs/smb/client/cifs_spnego.c
193
if (!cred)
fs/smb/client/cifs_spnego.c
197
GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred,
fs/smb/client/cifs_spnego.c
21
static const struct cred *spnego_cred;
fs/smb/client/cifs_spnego.c
215
cred->thread_keyring = keyring;
fs/smb/client/cifs_spnego.c
216
cred->jit_keyring = KEY_REQKEY_DEFL_THREAD_KEYRING;
fs/smb/client/cifs_spnego.c
217
spnego_cred = cred;
fs/smb/client/cifs_spnego.c
225
put_cred(cred);
fs/smb/client/cifsacl.c
286
const struct cred *saved_cred;
fs/smb/client/cifsacl.c
344
const struct cred *saved_cred;
fs/smb/client/cifsacl.c
460
struct cred *cred;
fs/smb/client/cifsacl.c
473
cred = prepare_kernel_cred(&init_task);
fs/smb/client/cifsacl.c
474
if (!cred)
fs/smb/client/cifsacl.c
478
GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred,
fs/smb/client/cifsacl.c
494
cred->thread_keyring = keyring;
fs/smb/client/cifsacl.c
495
cred->jit_keyring = KEY_REQKEY_DEFL_THREAD_KEYRING;
fs/smb/client/cifsacl.c
496
root_cred = cred;
fs/smb/client/cifsacl.c
504
put_cred(cred);
fs/smb/client/cifsacl.c
64
static const struct cred *root_cred;
fs/smb/server/ksmbd_work.h
61
const struct cred *saved_cred;
fs/smb/server/smb_common.c
768
struct cred *cred;
fs/smb/server/smb_common.c
781
cred = prepare_kernel_cred(&init_task);
fs/smb/server/smb_common.c
782
if (!cred)
fs/smb/server/smb_common.c
785
cred->fsuid = make_kuid(&init_user_ns, uid);
fs/smb/server/smb_common.c
786
cred->fsgid = make_kgid(&init_user_ns, gid);
fs/smb/server/smb_common.c
790
abort_creds(cred);
fs/smb/server/smb_common.c
800
set_groups(cred, gi);
fs/smb/server/smb_common.c
803
if (!uid_eq(cred->fsuid, GLOBAL_ROOT_UID))
fs/smb/server/smb_common.c
804
cred->cap_effective = cap_drop_fs_set(cred->cap_effective);
fs/smb/server/smb_common.c
807
work->saved_cred = override_creds(cred);
fs/smb/server/smb_common.c
818
const struct cred *cred;
fs/smb/server/smb_common.c
821
cred = revert_creds(work->saved_cred);
fs/smb/server/smb_common.c
823
put_cred(cred);
fs/xfs/xfs_handle.c
235
const struct cred *cred = current_cred();
fs/xfs/xfs_handle.c
274
FD_PREPARE(fdf, 0, dentry_open(&path, hreq->oflags, cred));
include/keys/request_key_auth-type.h
20
const struct cred *cred;
include/linux/audit.h
432
const struct cred *new,
include/linux/audit.h
433
const struct cred *old);
include/linux/audit.h
434
extern void __audit_log_capset(const struct cred *new, const struct cred *old);
include/linux/audit.h
512
const struct cred *new,
include/linux/audit.h
513
const struct cred *old)
include/linux/audit.h
520
static inline void audit_log_capset(const struct cred *new,
include/linux/audit.h
521
const struct cred *old)
include/linux/audit.h
679
const struct cred *new,
include/linux/audit.h
680
const struct cred *old)
include/linux/audit.h
684
static inline void audit_log_capset(const struct cred *new,
include/linux/audit.h
685
const struct cred *old)
include/linux/backing-file.h
16
const struct cred *cred;
include/linux/backing-file.h
23
const struct cred *cred);
include/linux/backing-file.h
26
umode_t mode, const struct cred *cred);
include/linux/binfmts.h
56
struct cred *cred; /* new credentials */
include/linux/cred.h
151
extern void __put_cred(struct cred *);
include/linux/cred.h
154
extern const struct cred *get_task_cred(struct task_struct *);
include/linux/cred.h
155
extern struct cred *cred_alloc_blank(void);
include/linux/cred.h
156
extern struct cred *prepare_creds(void);
include/linux/cred.h
157
extern struct cred *prepare_exec_creds(void);
include/linux/cred.h
158
extern int commit_creds(struct cred *);
include/linux/cred.h
159
extern void abort_creds(struct cred *);
include/linux/cred.h
160
extern struct cred *prepare_kernel_cred(struct task_struct *);
include/linux/cred.h
161
static inline const struct cred *kernel_cred(void)
include/linux/cred.h
164
return rcu_dereference_raw(init_task.cred);
include/linux/cred.h
166
extern int set_security_override(struct cred *, u32);
include/linux/cred.h
167
extern int set_create_files_as(struct cred *, struct inode *);
include/linux/cred.h
168
extern int cred_fscmp(const struct cred *, const struct cred *);
include/linux/cred.h
170
extern int set_cred_ucounts(struct cred *);
include/linux/cred.h
172
static inline bool cap_ambient_invariant_ok(const struct cred *cred)
include/linux/cred.h
174
return cap_issubset(cred->cap_ambient,
include/linux/cred.h
175
cap_intersect(cred->cap_permitted,
include/linux/cred.h
176
cred->cap_inheritable));
include/linux/cred.h
179
static inline const struct cred *override_creds(const struct cred *override_cred)
include/linux/cred.h
181
return rcu_replace_pointer(current->cred, override_cred, 1);
include/linux/cred.h
184
static inline const struct cred *revert_creds(const struct cred *revert_cred)
include/linux/cred.h
186
return rcu_replace_pointer(current->cred, revert_cred, 1);
include/linux/cred.h
190
const struct cred *,
include/linux/cred.h
192
override_creds(override_cred), const struct cred *override_cred)
include/linux/cred.h
194
#define scoped_with_creds(cred) \
include/linux/cred.h
195
scoped_class(override_creds, __UNIQUE_ID(label), cred)
include/linux/cred.h
20
struct cred;
include/linux/cred.h
213
static inline const struct cred *get_cred_many(const struct cred *cred, int nr)
include/linux/cred.h
215
struct cred *nonconst_cred = (struct cred *) cred;
include/linux/cred.h
216
if (!cred)
include/linux/cred.h
217
return cred;
include/linux/cred.h
220
return cred;
include/linux/cred.h
232
static inline const struct cred *get_cred(const struct cred *cred)
include/linux/cred.h
234
return get_cred_many(cred, 1);
include/linux/cred.h
237
static inline const struct cred *get_cred_rcu(const struct cred *cred)
include/linux/cred.h
239
struct cred *nonconst_cred = (struct cred *) cred;
include/linux/cred.h
240
if (!cred)
include/linux/cred.h
245
return cred;
include/linux/cred.h
260
static inline void put_cred_many(const struct cred *_cred, int nr)
include/linux/cred.h
262
struct cred *cred = (struct cred *) _cred;
include/linux/cred.h
264
if (cred) {
include/linux/cred.h
265
if (atomic_long_sub_and_test(nr, &cred->usage))
include/linux/cred.h
266
__put_cred(cred);
include/linux/cred.h
277
static inline void put_cred(const struct cred *cred)
include/linux/cred.h
279
put_cred_many(cred, 1);
include/linux/cred.h
283
struct cred *,
include/linux/cred.h
287
DEFINE_FREE(put_cred, struct cred *, if (!IS_ERR_OR_NULL(_T)) put_cred(_T))
include/linux/cred.h
296
rcu_dereference_protected(current->cred, 1)
include/linux/cred.h
339
const struct cred *__cred; \
include/linux/cred.h
354
const struct cred *__cred; \
include/linux/cred.h
362
__typeof__(((struct cred *)NULL)->xxx) ___val; \
include/linux/cred.h
403
const struct cred *__cred; \
include/linux/cred.h
411
const struct cred *__cred; \
include/linux/cred.h
419
const struct cred *__cred; \
include/linux/cred.h
68
extern void set_groups(struct cred *, struct group_info *);
include/linux/filter.h
1177
static inline bool bpf_dump_raw_ok(const struct cred *cred)
include/linux/filter.h
1182
return kallsyms_show_value(cred);
include/linux/fs.h
1268
const struct cred *f_cred;
include/linux/fs.h
1815
const struct cred *cred);
include/linux/fs.h
1817
const struct cred *cred);
include/linux/fs.h
2471
const struct cred *creds);
include/linux/fs.h
2473
const struct cred *cred);
include/linux/fs.h
2475
const struct cred *cred);
include/linux/fs.h
67
struct cred;
include/linux/fs_context.h
17
struct cred;
include/linux/fs_context.h
99
const struct cred *cred; /* The mounter's credentials */
include/linux/fscache-cache.h
119
extern bool fscache_wait_for_operation(struct netfs_cache_resources *cred,
include/linux/io_uring_types.h
419
const struct cred *sq_creds; /* cred used for __io_sq_thread() */
include/linux/io_uring_types.h
763
const struct cred *creds;
include/linux/kallsyms.h
24
struct cred;
include/linux/kallsyms.h
68
extern bool kallsyms_show_value(const struct cred *cred);
include/linux/key.h
100
struct cred;
include/linux/key.h
287
const struct cred *cred,
include/linux/key.h
422
const struct cred *cred,
include/linux/key.h
494
extern int install_thread_keyring_to_cred(struct cred *cred);
include/linux/key.h
495
extern void key_fsuid_changed(struct cred *new_cred);
include/linux/key.h
496
extern void key_fsgid_changed(struct cred *new_cred);
include/linux/lockd/bind.h
51
const struct cred *cred;
include/linux/lockd/bind.h
82
extern int lockd_up(struct net *net, const struct cred *cred);
include/linux/lockd/lockd.h
239
const struct cred *cred);
include/linux/lockd/lockd.h
74
const struct cred *h_cred;
include/linux/lsm_hook_defs.h
183
LSM_HOOK(int, 0, inode_copy_up, struct dentry *src, struct cred **new)
include/linux/lsm_hook_defs.h
216
LSM_HOOK(int, 0, cred_alloc_blank, struct cred *cred, gfp_t gfp)
include/linux/lsm_hook_defs.h
217
LSM_HOOK(void, LSM_RET_VOID, cred_free, struct cred *cred)
include/linux/lsm_hook_defs.h
218
LSM_HOOK(int, 0, cred_prepare, struct cred *new, const struct cred *old,
include/linux/lsm_hook_defs.h
220
LSM_HOOK(void, LSM_RET_VOID, cred_transfer, struct cred *new,
include/linux/lsm_hook_defs.h
221
const struct cred *old)
include/linux/lsm_hook_defs.h
222
LSM_HOOK(void, LSM_RET_VOID, cred_getsecid, const struct cred *c, u32 *secid)
include/linux/lsm_hook_defs.h
223
LSM_HOOK(void, LSM_RET_VOID, cred_getlsmprop, const struct cred *c,
include/linux/lsm_hook_defs.h
225
LSM_HOOK(int, 0, kernel_act_as, struct cred *new, u32 secid)
include/linux/lsm_hook_defs.h
226
LSM_HOOK(int, 0, kernel_create_files_as, struct cred *new, struct inode *inode)
include/linux/lsm_hook_defs.h
235
LSM_HOOK(int, 0, task_fix_setuid, struct cred *new, const struct cred *old,
include/linux/lsm_hook_defs.h
237
LSM_HOOK(int, 0, task_fix_setgid, struct cred *new, const struct cred * old,
include/linux/lsm_hook_defs.h
239
LSM_HOOK(int, 0, task_fix_setgroups, struct cred *new, const struct cred * old)
include/linux/lsm_hook_defs.h
249
LSM_HOOK(int, 0, task_prlimit, const struct cred *cred,
include/linux/lsm_hook_defs.h
250
const struct cred *tcred, unsigned int flags)
include/linux/lsm_hook_defs.h
257
int sig, const struct cred *cred)
include/linux/lsm_hook_defs.h
262
LSM_HOOK(int, 0, userns_create, const struct cred *cred)
include/linux/lsm_hook_defs.h
29
LSM_HOOK(int, 0, binder_set_context_mgr, const struct cred *mgr)
include/linux/lsm_hook_defs.h
30
LSM_HOOK(int, 0, binder_transaction, const struct cred *from,
include/linux/lsm_hook_defs.h
31
const struct cred *to)
include/linux/lsm_hook_defs.h
312
LSM_HOOK(int, 0, post_notification, const struct cred *w_cred,
include/linux/lsm_hook_defs.h
313
const struct cred *cred, struct watch_notification *n)
include/linux/lsm_hook_defs.h
32
LSM_HOOK(int, 0, binder_transfer_binder, const struct cred *from,
include/linux/lsm_hook_defs.h
33
const struct cred *to)
include/linux/lsm_hook_defs.h
34
LSM_HOOK(int, 0, binder_transfer_file, const struct cred *from,
include/linux/lsm_hook_defs.h
35
const struct cred *to, const struct file *file)
include/linux/lsm_hook_defs.h
41
LSM_HOOK(int, 0, capset, struct cred *new, const struct cred *old,
include/linux/lsm_hook_defs.h
411
LSM_HOOK(int, 0, key_alloc, struct key *key, const struct cred *cred,
include/linux/lsm_hook_defs.h
413
LSM_HOOK(int, 0, key_permission, key_ref_t key_ref, const struct cred *cred,
include/linux/lsm_hook_defs.h
44
LSM_HOOK(int, 0, capable, const struct cred *cred, struct user_namespace *ns,
include/linux/lsm_hook_defs.h
457
LSM_HOOK(int, 0, uring_override_creds, const struct cred *new)
include/linux/lsm_hook_defs.h
88
const struct qstr *name, const struct cred *old, struct cred *new)
include/linux/nfs_fs.h
102
const struct cred *cred;
include/linux/nfs_fs.h
452
extern void nfs_access_add_cache(struct inode *, struct nfs_access_entry *, const struct cred *);
include/linux/nfs_fs.h
468
extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, const struct cred *cred, fmode_t mode);
include/linux/nfs_fs.h
552
static inline const struct cred *nfs_file_cred(struct file *file)
include/linux/nfs_fs.h
558
return ctx->cred;
include/linux/nfs_fs.h
587
extern int nfs_may_open(struct inode *inode, const struct cred *cred, int openflags);
include/linux/nfs_fs.h
589
extern int nfs_access_get_cached(struct inode *inode, const struct cred *cred,
include/linux/nfs_fs_sb.h
295
const struct cred *cred;
include/linux/nfs_xdr.h
1649
const struct cred *cred;
include/linux/nfs_xdr.h
1713
const struct cred *cred;
include/linux/nfs_xdr.h
1744
const struct cred *cred;
include/linux/nfs_xdr.h
1753
const struct cred *cred;
include/linux/nfs_xdr.h
1797
int (*access) (struct inode *, struct nfs_access_entry *, const struct cred *);
include/linux/nfs_xdr.h
283
const struct cred *cred;
include/linux/nfs_xdr.h
323
const struct cred *cred;
include/linux/nfs_xdr.h
348
const struct cred *cred;
include/linux/nfs_xdr.h
788
const struct cred *cred;
include/linux/nfslocalio.h
61
const struct cred *,
include/linux/nfslocalio.h
75
struct rpc_clnt *, const struct cred *,
include/linux/nsproxy.h
104
struct cred *, struct fs_struct *);
include/linux/nsproxy.h
58
const struct cred *cred;
include/linux/nsproxy.h
61
static inline struct cred *nsset_cred(struct nsset *set)
include/linux/nsproxy.h
64
return (struct cred *)set->cred;
include/linux/nsproxy.h
96
void switch_cred_namespaces(const struct cred *old, const struct cred *new);
include/linux/pds/pds_intr.h
130
u32 cred, u32 flags)
include/linux/pds/pds_intr.h
132
if (WARN_ON_ONCE(cred > PDS_CORE_INTR_CRED_COUNT)) {
include/linux/pds/pds_intr.h
133
cred = ioread32(&intr_ctrl->credits);
include/linux/pds/pds_intr.h
134
cred &= PDS_CORE_INTR_CRED_COUNT_SIGNED;
include/linux/pds/pds_intr.h
137
iowrite32(cred | flags, &intr_ctrl->credits);
include/linux/pds/pds_intr.h
143
u32 cred;
include/linux/pds/pds_intr.h
145
cred = ioread32(&intr_ctrl->credits);
include/linux/pds/pds_intr.h
146
cred &= PDS_CORE_INTR_CRED_COUNT_SIGNED;
include/linux/pds/pds_intr.h
147
cred |= flags;
include/linux/pds/pds_intr.h
148
iowrite32(cred, &intr_ctrl->credits);
include/linux/ptrace.h
59
const struct cred *ptracer_cred);
include/linux/sched.h
1146
const struct cred __rcu *ptracer_cred;
include/linux/sched.h
1149
const struct cred __rcu *real_cred;
include/linux/sched.h
1152
const struct cred __rcu *cred;
include/linux/sched/signal.h
337
const struct cred *);
include/linux/security.h
1105
static inline int security_inode_copy_up(struct dentry *src, struct cred **new)
include/linux/security.h
1227
static inline int security_cred_alloc_blank(struct cred *cred, gfp_t gfp)
include/linux/security.h
1232
static inline void security_cred_free(struct cred *cred)
include/linux/security.h
1235
static inline int security_prepare_creds(struct cred *new,
include/linux/security.h
1236
const struct cred *old,
include/linux/security.h
1242
static inline void security_transfer_creds(struct cred *new,
include/linux/security.h
1243
const struct cred *old)
include/linux/security.h
1247
static inline void security_cred_getsecid(const struct cred *c, u32 *secid)
include/linux/security.h
1252
static inline void security_cred_getlsmprop(const struct cred *c,
include/linux/security.h
1256
static inline int security_kernel_act_as(struct cred *cred, u32 secid)
include/linux/security.h
1261
static inline int security_kernel_create_files_as(struct cred *cred,
include/linux/security.h
1298
static inline int security_task_fix_setuid(struct cred *new,
include/linux/security.h
1299
const struct cred *old,
include/linux/security.h
1305
static inline int security_task_fix_setgid(struct cred *new,
include/linux/security.h
1306
const struct cred *old,
include/linux/security.h
1312
static inline int security_task_fix_setgroups(struct cred *new,
include/linux/security.h
1313
const struct cred *old)
include/linux/security.h
1359
static inline int security_task_prlimit(const struct cred *cred,
include/linux/security.h
1360
const struct cred *tcred,
include/linux/security.h
1390
const struct cred *cred)
include/linux/security.h
1406
static inline int security_create_user_ns(const struct cred *cred)
include/linux/security.h
1619
int security_post_notification(const struct cred *w_cred,
include/linux/security.h
1620
const struct cred *cred,
include/linux/security.h
1623
static inline int security_post_notification(const struct cred *w_cred,
include/linux/security.h
1624
const struct cred *cred,
include/linux/security.h
174
extern int cap_capable(const struct cred *cred, struct user_namespace *ns,
include/linux/security.h
181
extern int cap_capset(struct cred *new, const struct cred *old,
include/linux/security.h
196
extern int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags);
include/linux/security.h
2139
int security_key_alloc(struct key *key, const struct cred *cred, unsigned long flags);
include/linux/security.h
2141
int security_key_permission(key_ref_t key_ref, const struct cred *cred,
include/linux/security.h
2151
const struct cred *cred,
include/linux/security.h
2162
const struct cred *cred,
include/linux/security.h
2376
extern int security_uring_override_creds(const struct cred *new);
include/linux/security.h
2381
static inline int security_uring_override_creds(const struct cred *new)
include/linux/security.h
332
int security_binder_set_context_mgr(const struct cred *mgr);
include/linux/security.h
333
int security_binder_transaction(const struct cred *from,
include/linux/security.h
334
const struct cred *to);
include/linux/security.h
335
int security_binder_transfer_binder(const struct cred *from,
include/linux/security.h
336
const struct cred *to);
include/linux/security.h
337
int security_binder_transfer_file(const struct cred *from,
include/linux/security.h
338
const struct cred *to, const struct file *file);
include/linux/security.h
345
int security_capset(struct cred *new, const struct cred *old,
include/linux/security.h
349
int security_capable(const struct cred *cred,
include/linux/security.h
395
const struct cred *old,
include/linux/security.h
396
struct cred *new);
include/linux/security.h
43
struct cred;
include/linux/security.h
464
int security_inode_copy_up(struct dentry *src, struct cred **new);
include/linux/security.h
494
int security_cred_alloc_blank(struct cred *cred, gfp_t gfp);
include/linux/security.h
495
void security_cred_free(struct cred *cred);
include/linux/security.h
496
int security_prepare_creds(struct cred *new, const struct cred *old, gfp_t gfp);
include/linux/security.h
497
void security_transfer_creds(struct cred *new, const struct cred *old);
include/linux/security.h
498
void security_cred_getsecid(const struct cred *c, u32 *secid);
include/linux/security.h
499
void security_cred_getlsmprop(const struct cred *c, struct lsm_prop *prop);
include/linux/security.h
500
int security_kernel_act_as(struct cred *new, u32 secid);
include/linux/security.h
501
int security_kernel_create_files_as(struct cred *new, struct inode *inode);
include/linux/security.h
511
int security_task_fix_setuid(struct cred *new, const struct cred *old,
include/linux/security.h
513
int security_task_fix_setgid(struct cred *new, const struct cred *old,
include/linux/security.h
515
int security_task_fix_setgroups(struct cred *new, const struct cred *old);
include/linux/security.h
524
int security_task_prlimit(const struct cred *cred, const struct cred *tcred,
include/linux/security.h
532
int sig, const struct cred *cred);
include/linux/security.h
536
int security_create_user_ns(const struct cred *cred);
include/linux/security.h
638
static inline int security_binder_set_context_mgr(const struct cred *mgr)
include/linux/security.h
643
static inline int security_binder_transaction(const struct cred *from,
include/linux/security.h
644
const struct cred *to)
include/linux/security.h
649
static inline int security_binder_transfer_binder(const struct cred *from,
include/linux/security.h
650
const struct cred *to)
include/linux/security.h
655
static inline int security_binder_transfer_file(const struct cred *from,
include/linux/security.h
656
const struct cred *to,
include/linux/security.h
681
static inline int security_capset(struct cred *new,
include/linux/security.h
682
const struct cred *old,
include/linux/security.h
690
static inline int security_capable(const struct cred *cred,
include/linux/security.h
695
return cap_capable(cred, ns, cap, opts);
include/linux/security.h
876
const struct cred *old,
include/linux/security.h
877
struct cred *new)
include/linux/socket.h
15
struct cred;
include/linux/sunrpc/auth.h
190
struct rpc_cred *get_rpccred(struct rpc_cred *cred)
include/linux/sunrpc/auth.h
192
if (cred != NULL && refcount_inc_not_zero(&cred->cr_count))
include/linux/sunrpc/auth.h
193
return cred;
include/linux/sunrpc/auth.h
39
const struct cred *cred;
include/linux/sunrpc/auth.h
57
const struct cred *cr_cred;
include/linux/sunrpc/auth.h
66
const struct cred *rpc_machine_cred(void);
include/linux/sunrpc/clnt.h
153
const struct cred *cred;
include/linux/sunrpc/clnt.h
218
struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred,
include/linux/sunrpc/clnt.h
95
const struct cred *cl_cred;
include/linux/sunrpc/sched.h
29
const struct cred * rpc_cred; /* Credentials */
include/linux/sunrpc/svc_xprt.h
166
int flags, const struct cred *cred);
include/linux/sunrpc/svc_xprt.h
170
const struct cred *cred);
include/linux/sunrpc/svc_xprt.h
79
const struct cred *xpt_cred;
include/linux/sunrpc/svcauth.h
161
const struct cred *,
include/linux/sunrpc/svcauth.h
37
static inline void init_svc_cred(struct svc_cred *cred)
include/linux/sunrpc/svcauth.h
39
cred->cr_group_info = NULL;
include/linux/sunrpc/svcauth.h
40
cred->cr_raw_principal = NULL;
include/linux/sunrpc/svcauth.h
41
cred->cr_principal = NULL;
include/linux/sunrpc/svcauth.h
42
cred->cr_targ_princ = NULL;
include/linux/sunrpc/svcauth.h
43
cred->cr_gss_mech = NULL;
include/linux/sunrpc/svcauth.h
46
static inline void free_svc_cred(struct svc_cred *cred)
include/linux/sunrpc/svcauth.h
48
if (cred->cr_group_info)
include/linux/sunrpc/svcauth.h
49
put_group_info(cred->cr_group_info);
include/linux/sunrpc/svcauth.h
50
kfree(cred->cr_raw_principal);
include/linux/sunrpc/svcauth.h
51
kfree(cred->cr_principal);
include/linux/sunrpc/svcauth.h
52
kfree(cred->cr_targ_princ);
include/linux/sunrpc/svcauth.h
53
gss_mech_put(cred->cr_gss_mech);
include/linux/sunrpc/svcauth.h
54
init_svc_cred(cred);
include/linux/sunrpc/svcsock.h
68
const struct cred *cred);
include/linux/umh.h
11
struct cred;
include/linux/umh.h
28
int (*init)(struct subprocess_info *info, struct cred *new);
include/linux/umh.h
39
int (*init)(struct subprocess_info *info, struct cred *new),
include/linux/user_namespace.h
183
extern int create_user_ns(struct cred *new);
include/linux/user_namespace.h
184
extern int unshare_userns(unsigned long unshare_flags, struct cred **new_cred);
include/linux/user_namespace.h
214
static inline int create_user_ns(struct cred *new)
include/linux/user_namespace.h
220
struct cred **new_cred)
include/linux/watch_queue.h
104
const struct cred *cred,
include/linux/watch_queue.h
108
__post_watch_notification(wlist, n, cred, id);
include/linux/watch_queue.h
19
struct cred;
include/linux/watch_queue.h
63
const struct cred *cred; /* Creds of the owner of the watch */
include/linux/watch_queue.h
81
const struct cred *,
include/net/af_vsock.h
46
const struct cred *owner;
include/net/sock.h
544
const struct cred *sk_peer_cred;
include/trace/events/capability.h
28
TP_PROTO(const struct cred *cred, struct user_namespace *target_ns,
include/trace/events/capability.h
31
TP_ARGS(cred, target_ns, capable_ns, cap, ret),
include/trace/events/capability.h
34
__field(const struct cred *, cred)
include/trace/events/capability.h
42
__entry->cred = cred;
include/trace/events/capability.h
50
__entry->cred, __entry->target_ns, __entry->capable_ns, __entry->cap,
include/trace/events/rpcgss.h
149
__field(const void *, cred)
include/trace/events/rpcgss.h
155
__entry->cred = gc;
include/trace/events/rpcgss.h
161
__entry->cred, show_gss_service(__entry->service),
init/init_task.c
152
RCU_POINTER_INITIALIZER(cred, &init_cred),
init/init_task.c
71
static struct cred init_cred = {
io_uring/io_uring.c
1370
const struct cred *creds = NULL;
io_uring/io_uring.c
2405
struct cred *creds;
io_uring/register.c
78
const struct cred *creds;
io_uring/register.c
92
const struct cred *creds;
io_uring/sqpoll.c
216
const struct cred *creds = NULL;
ipc/namespace.c
238
!ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN))
kernel/audit.c
1640
const struct cred *cred;
kernel/audit.c
1652
cred = current_cred();
kernel/audit.c
1656
from_kuid(&init_user_ns, cred->uid),
kernel/audit.c
2438
const struct cred *cred;
kernel/audit.c
2445
cred = current_cred();
kernel/audit.c
2454
from_kuid(&init_user_ns, cred->uid),
kernel/audit.c
2455
from_kgid(&init_user_ns, cred->gid),
kernel/audit.c
2456
from_kuid(&init_user_ns, cred->euid),
kernel/audit.c
2457
from_kuid(&init_user_ns, cred->suid),
kernel/audit.c
2458
from_kuid(&init_user_ns, cred->fsuid),
kernel/audit.c
2459
from_kgid(&init_user_ns, cred->egid),
kernel/audit.c
2460
from_kgid(&init_user_ns, cred->sgid),
kernel/audit.c
2461
from_kgid(&init_user_ns, cred->fsgid),
kernel/auditsc.c
1621
const struct cred *cred;
kernel/auditsc.c
1626
cred = current_cred();
kernel/auditsc.c
1639
from_kuid(&init_user_ns, cred->uid),
kernel/auditsc.c
1640
from_kgid(&init_user_ns, cred->gid),
kernel/auditsc.c
1641
from_kuid(&init_user_ns, cred->euid),
kernel/auditsc.c
1642
from_kuid(&init_user_ns, cred->suid),
kernel/auditsc.c
1643
from_kuid(&init_user_ns, cred->fsuid),
kernel/auditsc.c
1644
from_kgid(&init_user_ns, cred->egid),
kernel/auditsc.c
1645
from_kgid(&init_user_ns, cred->sgid),
kernel/auditsc.c
1646
from_kgid(&init_user_ns, cred->fsgid));
kernel/auditsc.c
2740
const struct cred *new, const struct cred *old)
kernel/auditsc.c
2783
void __audit_log_capset(const struct cred *new, const struct cred *old)
kernel/auditsc.c
381
const struct cred *cred,
kernel/auditsc.c
389
return audit_compare_uid(cred->uid, name, f, ctx);
kernel/auditsc.c
391
return audit_compare_gid(cred->gid, name, f, ctx);
kernel/auditsc.c
393
return audit_compare_uid(cred->euid, name, f, ctx);
kernel/auditsc.c
395
return audit_compare_gid(cred->egid, name, f, ctx);
kernel/auditsc.c
399
return audit_compare_uid(cred->suid, name, f, ctx);
kernel/auditsc.c
401
return audit_compare_gid(cred->sgid, name, f, ctx);
kernel/auditsc.c
403
return audit_compare_uid(cred->fsuid, name, f, ctx);
kernel/auditsc.c
405
return audit_compare_gid(cred->fsgid, name, f, ctx);
kernel/auditsc.c
408
return audit_uid_comparator(cred->uid, f->op,
kernel/auditsc.c
411
return audit_uid_comparator(cred->uid, f->op, cred->euid);
kernel/auditsc.c
413
return audit_uid_comparator(cred->uid, f->op, cred->suid);
kernel/auditsc.c
415
return audit_uid_comparator(cred->uid, f->op, cred->fsuid);
kernel/auditsc.c
419
cred->euid);
kernel/auditsc.c
422
cred->suid);
kernel/auditsc.c
425
cred->fsuid);
kernel/auditsc.c
428
return audit_uid_comparator(cred->euid, f->op, cred->suid);
kernel/auditsc.c
430
return audit_uid_comparator(cred->euid, f->op, cred->fsuid);
kernel/auditsc.c
433
return audit_uid_comparator(cred->suid, f->op, cred->fsuid);
kernel/auditsc.c
436
return audit_gid_comparator(cred->gid, f->op, cred->egid);
kernel/auditsc.c
438
return audit_gid_comparator(cred->gid, f->op, cred->sgid);
kernel/auditsc.c
440
return audit_gid_comparator(cred->gid, f->op, cred->fsgid);
kernel/auditsc.c
443
return audit_gid_comparator(cred->egid, f->op, cred->sgid);
kernel/auditsc.c
445
return audit_gid_comparator(cred->egid, f->op, cred->fsgid);
kernel/auditsc.c
448
return audit_gid_comparator(cred->sgid, f->op, cred->fsgid);
kernel/auditsc.c
471
const struct cred *cred;
kernel/auditsc.c
479
cred = rcu_dereference_check(tsk->cred, tsk == current || task_creation);
kernel/auditsc.c
505
result = audit_uid_comparator(cred->uid, f->op, f->uid);
kernel/auditsc.c
508
result = audit_uid_comparator(cred->euid, f->op, f->uid);
kernel/auditsc.c
511
result = audit_uid_comparator(cred->suid, f->op, f->uid);
kernel/auditsc.c
514
result = audit_uid_comparator(cred->fsuid, f->op, f->uid);
kernel/auditsc.c
517
result = audit_gid_comparator(cred->gid, f->op, f->gid);
kernel/auditsc.c
520
result = groups_search(cred->group_info, f->gid);
kernel/auditsc.c
523
result = !groups_search(cred->group_info, f->gid);
kernel/auditsc.c
527
result = audit_gid_comparator(cred->egid, f->op, f->gid);
kernel/auditsc.c
530
result = groups_search(cred->group_info, f->gid);
kernel/auditsc.c
533
result = !groups_search(cred->group_info, f->gid);
kernel/auditsc.c
537
result = audit_gid_comparator(cred->sgid, f->op, f->gid);
kernel/auditsc.c
540
result = audit_gid_comparator(cred->fsgid, f->op, f->gid);
kernel/auditsc.c
749
result = audit_field_compare(tsk, cred, f, ctx, name);
kernel/bpf/syscall.c
4924
const struct cred *f_cred)
kernel/capability.c
221
struct cred *new;
kernel/capability.c
494
const struct cred *cred;
kernel/capability.c
497
cred = rcu_dereference(tsk->ptracer_cred);
kernel/capability.c
498
if (cred)
kernel/capability.c
499
ret = security_capable(cred, ns, CAP_SYS_PTRACE,
kernel/cgroup/cgroup-v1.c
504
const struct cred *cred, *tcred;
kernel/cgroup/cgroup-v1.c
522
cred = of->file->f_cred;
kernel/cgroup/cgroup-v1.c
524
if (!uid_eq(cred->euid, GLOBAL_ROOT_UID) &&
kernel/cgroup/cgroup-v1.c
525
!uid_eq(cred->euid, tcred->uid) &&
kernel/cgroup/cgroup-v1.c
526
!uid_eq(cred->euid, tcred->suid))
kernel/cgroup/namespace.c
97
if (!ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN) ||
kernel/cred.c
100
cred = (struct cred *) tsk->cred;
kernel/cred.c
101
tsk->cred = NULL;
kernel/cred.c
103
if (real_cred == cred) {
kernel/cred.c
104
put_cred_many(cred, 2);
kernel/cred.c
107
put_cred(cred);
kernel/cred.c
126
const struct cred *get_task_cred(struct task_struct *task)
kernel/cred.c
128
const struct cred *cred;
kernel/cred.c
133
cred = __task_cred((task));
kernel/cred.c
134
BUG_ON(!cred);
kernel/cred.c
135
} while (!get_cred_rcu(cred));
kernel/cred.c
138
return cred;
kernel/cred.c
146
struct cred *cred_alloc_blank(void)
kernel/cred.c
148
struct cred *new;
kernel/cred.c
179
struct cred *prepare_creds(void)
kernel/cred.c
182
const struct cred *old;
kernel/cred.c
183
struct cred *new;
kernel/cred.c
191
old = task->cred;
kernel/cred.c
192
memcpy(new, old, sizeof(struct cred));
kernel/cred.c
230
struct cred *prepare_exec_creds(void)
kernel/cred.c
232
struct cred *new;
kernel/cred.c
265
struct cred *new;
kernel/cred.c
274
!p->cred->thread_keyring &&
kernel/cred.c
278
p->real_cred = get_cred_many(p->cred, 2);
kernel/cred.c
280
p->cred, atomic_long_read(&p->cred->usage));
kernel/cred.c
318
p->cred = p->real_cred = get_cred(new);
kernel/cred.c
329
static bool cred_cap_issubset(const struct cred *set, const struct cred *subset)
kernel/cred.c
368
int commit_creds(struct cred *new)
kernel/cred.c
371
const struct cred *old = task->real_cred;
kernel/cred.c
376
BUG_ON(task->cred != old);
kernel/cred.c
416
rcu_assign_pointer(task->cred, new);
kernel/cred.c
43
struct cred *cred = container_of(rcu, struct cred, rcu);
kernel/cred.c
448
void abort_creds(struct cred *new)
kernel/cred.c
45
kdebug("put_cred_rcu(%p)", cred);
kernel/cred.c
47
if (atomic_long_read(&cred->usage) != 0)
kernel/cred.c
472
int cred_fscmp(const struct cred *a, const struct cred *b)
kernel/cred.c
49
cred, atomic_long_read(&cred->usage));
kernel/cred.c
51
security_cred_free(cred);
kernel/cred.c
512
int set_cred_ucounts(struct cred *new)
kernel/cred.c
52
key_put(cred->session_keyring);
kernel/cred.c
53
key_put(cred->process_keyring);
kernel/cred.c
538
cred_jar = KMEM_CACHE(cred,
kernel/cred.c
54
key_put(cred->thread_keyring);
kernel/cred.c
55
key_put(cred->request_key_auth);
kernel/cred.c
558
struct cred *prepare_kernel_cred(struct task_struct *daemon)
kernel/cred.c
56
if (cred->group_info)
kernel/cred.c
560
const struct cred *old;
kernel/cred.c
561
struct cred *new;
kernel/cred.c
57
put_group_info(cred->group_info);
kernel/cred.c
58
free_uid(cred->user);
kernel/cred.c
59
if (cred->ucounts)
kernel/cred.c
60
put_ucounts(cred->ucounts);
kernel/cred.c
61
put_user_ns(cred->user_ns);
kernel/cred.c
617
int set_security_override(struct cred *new, u32 secid)
kernel/cred.c
62
kmem_cache_free(cred_jar, cred);
kernel/cred.c
632
int set_create_files_as(struct cred *new, struct inode *inode)
kernel/cred.c
71
void __put_cred(struct cred *cred)
kernel/cred.c
73
kdebug("__put_cred(%p{%ld})", cred,
kernel/cred.c
74
atomic_long_read(&cred->usage));
kernel/cred.c
76
BUG_ON(atomic_long_read(&cred->usage) != 0);
kernel/cred.c
77
BUG_ON(cred == current->cred);
kernel/cred.c
78
BUG_ON(cred == current->real_cred);
kernel/cred.c
80
if (cred->non_rcu)
kernel/cred.c
81
put_cred_rcu(&cred->rcu);
kernel/cred.c
83
call_rcu(&cred->rcu, put_cred_rcu);
kernel/cred.c
92
struct cred *real_cred, *cred;
kernel/cred.c
94
kdebug("exit_creds(%u,%p,%p,{%ld})", tsk->pid, tsk->real_cred, tsk->cred,
kernel/cred.c
95
atomic_long_read(&tsk->cred->usage));
kernel/cred.c
97
real_cred = (struct cred *) tsk->real_cred;
kernel/fork.c
3127
struct cred *new_cred = NULL;
kernel/groups.c
118
void set_groups(struct cred *new, struct group_info *group_info)
kernel/groups.c
136
struct cred *new;
kernel/groups.c
137
const struct cred *old;
kernel/groups.c
163
const struct cred *cred = current_cred();
kernel/groups.c
170
i = cred->group_info->ngroups;
kernel/groups.c
176
if (groups_to_user(grouplist, cred->group_info)) {
kernel/groups.c
229
const struct cred *cred = current_cred();
kernel/groups.c
232
if (!gid_eq(grp, cred->fsgid))
kernel/groups.c
233
retval = groups_search(cred->group_info, grp);
kernel/groups.c
241
const struct cred *cred = current_cred();
kernel/groups.c
244
if (!gid_eq(grp, cred->egid))
kernel/groups.c
245
retval = groups_search(cred->group_info, grp);
kernel/ksyms_common.c
28
bool kallsyms_show_value(const struct cred *cred)
kernel/ksyms_common.c
36
if (security_capable(cred, &init_user_ns, CAP_SYSLOG,
kernel/nsproxy.c
212
struct nsproxy **new_nsp, struct cred *new_cred, struct fs_struct *new_fs)
kernel/nsproxy.c
260
void switch_cred_namespaces(const struct cred *old, const struct cred *new)
kernel/nsproxy.c
357
nsset->cred = prepare_creds();
kernel/nsproxy.c
359
nsset->cred = current_cred();
kernel/nsproxy.c
360
if (!nsset->cred)
kernel/nsproxy.c
538
nsset->cred = NULL;
kernel/pid_namespace.c
408
!ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN))
kernel/ptrace.c
119
const struct cred *old_cred;
kernel/ptrace.c
278
const struct cred *cred = current_cred(), *tcred;
kernel/ptrace.c
302
caller_uid = cred->fsuid;
kernel/ptrace.c
303
caller_gid = cred->fsgid;
kernel/ptrace.c
313
caller_uid = cred->uid;
kernel/ptrace.c
314
caller_gid = cred->gid;
kernel/ptrace.c
70
const struct cred *ptracer_cred)
kernel/sched/syscalls.c
279
const struct cred *cred = current_cred(), *pcred;
kernel/sched/syscalls.c
283
return (uid_eq(cred->euid, pcred->euid) ||
kernel/sched/syscalls.c
284
uid_eq(cred->euid, pcred->uid));
kernel/signal.c
1485
static inline bool kill_as_cred_perm(const struct cred *cred,
kernel/signal.c
1488
const struct cred *pcred = __task_cred(target);
kernel/signal.c
1490
return uid_eq(cred->euid, pcred->suid) ||
kernel/signal.c
1491
uid_eq(cred->euid, pcred->uid) ||
kernel/signal.c
1492
uid_eq(cred->uid, pcred->suid) ||
kernel/signal.c
1493
uid_eq(cred->uid, pcred->uid);
kernel/signal.c
1522
struct pid *pid, const struct cred *cred)
kernel/signal.c
1544
if (!kill_as_cred_perm(cred, p)) {
kernel/signal.c
1548
ret = security_task_kill(p, &info, sig, cred);
kernel/signal.c
785
const struct cred *cred = current_cred();
kernel/signal.c
786
const struct cred *tcred = __task_cred(t);
kernel/signal.c
788
return uid_eq(cred->euid, tcred->suid) ||
kernel/signal.c
789
uid_eq(cred->euid, tcred->uid) ||
kernel/signal.c
790
uid_eq(cred->uid, tcred->suid) ||
kernel/signal.c
791
uid_eq(cred->uid, tcred->uid) ||
kernel/sys.c
1710
const struct cred *cred = current_cred(), *tcred;
kernel/sys.c
1717
id_match = (uid_eq(cred->uid, tcred->euid) &&
kernel/sys.c
1718
uid_eq(cred->uid, tcred->suid) &&
kernel/sys.c
1719
uid_eq(cred->uid, tcred->uid) &&
kernel/sys.c
1720
gid_eq(cred->gid, tcred->egid) &&
kernel/sys.c
1721
gid_eq(cred->gid, tcred->sgid) &&
kernel/sys.c
1722
gid_eq(cred->gid, tcred->gid));
kernel/sys.c
1726
return security_task_prlimit(cred, tcred, flags);
kernel/sys.c
221
const struct cred *cred = current_cred(), *pcred = __task_cred(p);
kernel/sys.c
223
if (uid_eq(pcred->uid, cred->euid) ||
kernel/sys.c
224
uid_eq(pcred->euid, cred->euid))
kernel/sys.c
263
const struct cred *cred = current_cred();
kernel/sys.c
300
uid = make_kuid(cred->user_ns, who);
kernel/sys.c
301
user = cred->user;
kernel/sys.c
303
uid = cred->uid;
kernel/sys.c
304
else if (!uid_eq(uid, cred->uid)) {
kernel/sys.c
313
if (!uid_eq(uid, cred->uid))
kernel/sys.c
333
const struct cred *cred = current_cred();
kernel/sys.c
368
uid = make_kuid(cred->user_ns, who);
kernel/sys.c
369
user = cred->user;
kernel/sys.c
371
uid = cred->uid;
kernel/sys.c
372
else if (!uid_eq(uid, cred->uid)) {
kernel/sys.c
384
if (!uid_eq(uid, cred->uid))
kernel/sys.c
416
const struct cred *old;
kernel/sys.c
417
struct cred *new;
kernel/sys.c
482
const struct cred *old;
kernel/sys.c
483
struct cred *new;
kernel/sys.c
523
static int set_user(struct cred *new)
kernel/sys.c
536
static void flag_nproc_exceeded(struct cred *new)
kernel/sys.c
573
const struct cred *old;
kernel/sys.c
574
struct cred *new;
kernel/sys.c
654
const struct cred *old;
kernel/sys.c
655
struct cred *new;
kernel/sys.c
711
const struct cred *old;
kernel/sys.c
712
struct cred *new;
kernel/sys.c
790
const struct cred *cred = current_cred();
kernel/sys.c
794
ruid = from_kuid_munged(cred->user_ns, cred->uid);
kernel/sys.c
795
euid = from_kuid_munged(cred->user_ns, cred->euid);
kernel/sys.c
796
suid = from_kuid_munged(cred->user_ns, cred->suid);
kernel/sys.c
813
const struct cred *old;
kernel/sys.c
814
struct cred *new;
kernel/sys.c
879
const struct cred *cred = current_cred();
kernel/sys.c
883
rgid = from_kgid_munged(cred->user_ns, cred->gid);
kernel/sys.c
884
egid = from_kgid_munged(cred->user_ns, cred->egid);
kernel/sys.c
885
sgid = from_kgid_munged(cred->user_ns, cred->sgid);
kernel/sys.c
906
const struct cred *old;
kernel/sys.c
907
struct cred *new;
kernel/sys.c
950
const struct cred *old;
kernel/sys.c
951
struct cred *new;
kernel/time/namespace.c
316
!ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN))
kernel/trace/trace_events_user.c
1452
CLASS(prepare_creds, cred)();
kernel/trace/trace_events_user.c
1453
if (!cred)
kernel/trace/trace_events_user.c
1465
cred->fsuid = GLOBAL_ROOT_UID;
kernel/trace/trace_events_user.c
1467
scoped_with_creds(cred) {
kernel/tsacct.c
24
const struct cred *tcred;
kernel/uid16.c
156
const struct cred *cred = current_cred();
kernel/uid16.c
162
i = cred->group_info->ngroups;
kernel/uid16.c
168
if (groups16_to_user(grouplist, cred->group_info)) {
kernel/uid16.c
66
const struct cred *cred = current_cred();
kernel/uid16.c
70
ruid = high2lowuid(from_kuid_munged(cred->user_ns, cred->uid));
kernel/uid16.c
71
euid = high2lowuid(from_kuid_munged(cred->user_ns, cred->euid));
kernel/uid16.c
72
suid = high2lowuid(from_kuid_munged(cred->user_ns, cred->suid));
kernel/uid16.c
89
const struct cred *cred = current_cred();
kernel/uid16.c
93
rgid = high2lowgid(from_kgid_munged(cred->user_ns, cred->gid));
kernel/uid16.c
94
egid = high2lowgid(from_kgid_munged(cred->user_ns, cred->egid));
kernel/uid16.c
95
sgid = high2lowgid(from_kgid_munged(cred->user_ns, cred->sgid));
kernel/umh.c
357
int (*init)(struct subprocess_info *info, struct cred *new),
kernel/umh.c
66
struct cred *new;
kernel/user_namespace.c
1176
const struct cred *cred = file->f_cred;
kernel/user_namespace.c
1185
uid_eq(ns->owner, cred->euid)) {
kernel/user_namespace.c
1189
if (uid_eq(uid, cred->euid))
kernel/user_namespace.c
1194
gid_eq(gid, cred->egid))
kernel/user_namespace.c
1346
struct cred *cred;
kernel/user_namespace.c
1364
cred = nsset_cred(nsset);
kernel/user_namespace.c
1365
if (!cred)
kernel/user_namespace.c
1368
put_user_ns(cred->user_ns);
kernel/user_namespace.c
1369
set_cred_user_ns(cred, get_user_ns(user_ns));
kernel/user_namespace.c
1371
if (set_cred_ucounts(cred) < 0)
kernel/user_namespace.c
177
int unshare_userns(unsigned long unshare_flags, struct cred **new_cred)
kernel/user_namespace.c
179
struct cred *cred;
kernel/user_namespace.c
185
cred = prepare_creds();
kernel/user_namespace.c
186
if (cred) {
kernel/user_namespace.c
187
err = create_user_ns(cred);
kernel/user_namespace.c
189
put_cred(cred);
kernel/user_namespace.c
191
*new_cred = cred;
kernel/user_namespace.c
44
static void set_cred_user_ns(struct cred *cred, struct user_namespace *user_ns)
kernel/user_namespace.c
49
cred->securebits = SECUREBITS_DEFAULT;
kernel/user_namespace.c
50
cred->cap_inheritable = CAP_EMPTY_SET;
kernel/user_namespace.c
51
cred->cap_permitted = CAP_FULL_SET;
kernel/user_namespace.c
52
cred->cap_effective = CAP_FULL_SET;
kernel/user_namespace.c
53
cred->cap_ambient = CAP_EMPTY_SET;
kernel/user_namespace.c
54
cred->cap_bset = CAP_FULL_SET;
kernel/user_namespace.c
56
key_put(cred->request_key_auth);
kernel/user_namespace.c
57
cred->request_key_auth = NULL;
kernel/user_namespace.c
60
cred->user_ns = user_ns;
kernel/user_namespace.c
83
int create_user_ns(struct cred *new)
kernel/utsname.c
133
!ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN))
kernel/watch_queue.c
195
const struct cred *cred,
kernel/watch_queue.c
220
if (security_post_notification(watch->cred, cred, n) < 0)
kernel/watch_queue.c
427
atomic_dec(&watch->cred->user->nr_watches);
kernel/watch_queue.c
428
put_cred(watch->cred);
kernel/watch_queue.c
464
const struct cred *cred;
kernel/watch_queue.c
473
cred = current_cred();
kernel/watch_queue.c
474
if (atomic_inc_return(&cred->user->nr_watches) > task_rlimit(current, RLIMIT_NOFILE)) {
kernel/watch_queue.c
475
atomic_dec(&cred->user->nr_watches);
kernel/watch_queue.c
479
watch->cred = get_cred(cred);
lib/vsprintf.c
870
const struct cred *cred;
lib/vsprintf.c
891
cred = current_cred();
lib/vsprintf.c
893
!uid_eq(cred->euid, cred->uid) ||
lib/vsprintf.c
894
!gid_eq(cred->egid, cred->gid))
mm/oom_kill.c
769
const struct cred *cred;
mm/oom_kill.c
789
cred = get_task_cred(tsk);
mm/oom_kill.c
790
trace_mark_victim(tsk, cred->uid.val);
mm/oom_kill.c
791
put_cred(cred);
net/bluetooth/af_bluetooth.c
215
const struct cred *old_cred;
net/core/net_namespace.c
1537
!ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN))
net/core/scm.c
51
const struct cred *cred = current_cred();
net/core/scm.c
52
kuid_t uid = make_kuid(cred->user_ns, creds->uid);
net/core/scm.c
53
kgid_t gid = make_kgid(cred->user_ns, creds->gid);
net/core/scm.c
60
((uid_eq(uid, cred->uid) || uid_eq(uid, cred->euid) ||
net/core/scm.c
61
uid_eq(uid, cred->suid)) || ns_capable(cred->user_ns, CAP_SETUID)) &&
net/core/scm.c
62
((gid_eq(gid, cred->gid) || gid_eq(gid, cred->egid) ||
net/core/scm.c
63
gid_eq(gid, cred->sgid)) || ns_capable(cred->user_ns, CAP_SETGID))) {
net/core/sock.c
1686
static const struct cred *sk_get_peer_cred(struct sock *sk)
net/core/sock.c
1688
const struct cred *cred;
net/core/sock.c
1691
cred = get_cred(sk->sk_peer_cred);
net/core/sock.c
1694
return cred;
net/core/sock.c
1697
static void cred_to_ucred(struct pid *pid, const struct cred *cred,
net/core/sock.c
1702
if (cred) {
net/core/sock.c
1705
ucred->uid = from_kuid_munged(current_ns, cred->euid);
net/core/sock.c
1706
ucred->gid = from_kgid_munged(current_ns, cred->egid);
net/core/sock.c
1954
const struct cred *cred;
net/core/sock.c
1957
cred = sk_get_peer_cred(sk);
net/core/sock.c
1958
if (!cred)
net/core/sock.c
1961
n = cred->group_info->ngroups;
net/core/sock.c
1964
put_cred(cred);
net/core/sock.c
1969
ret = groups_to_user(optval, cred->group_info);
net/core/sock.c
1970
put_cred(cred);
net/dns_resolver/dns_key.c
337
struct cred *cred;
net/dns_resolver/dns_key.c
347
cred = prepare_kernel_cred(&init_task);
net/dns_resolver/dns_key.c
348
if (!cred)
net/dns_resolver/dns_key.c
352
GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred,
net/dns_resolver/dns_key.c
368
cred->thread_keyring = keyring;
net/dns_resolver/dns_key.c
369
cred->jit_keyring = KEY_REQKEY_DEFL_THREAD_KEYRING;
net/dns_resolver/dns_key.c
370
dns_resolver_cache = cred;
net/dns_resolver/dns_key.c
378
put_cred(cred);
net/dns_resolver/dns_key.c
45
const struct cred *dns_resolver_cache;
net/dns_resolver/internal.h
36
extern const struct cred *dns_resolver_cache;
net/netfilter/nf_log_syslog.c
173
const struct cred *cred = sk->sk_socket->file->f_cred;
net/netfilter/nf_log_syslog.c
176
from_kuid_munged(&init_user_ns, cred->fsuid),
net/netfilter/nf_log_syslog.c
177
from_kgid_munged(&init_user_ns, cred->fsgid));
net/netfilter/nfnetlink_log.c
617
const struct cred *cred = file->f_cred;
net/netfilter/nfnetlink_log.c
619
__be32 uid = htonl(from_kuid_munged(user_ns, cred->fsuid));
net/netfilter/nfnetlink_log.c
620
__be32 gid = htonl(from_kgid_munged(user_ns, cred->fsgid));
net/netfilter/nfnetlink_queue.c
548
const struct cred *cred;
net/netfilter/nfnetlink_queue.c
555
cred = sk->sk_socket->file->f_cred;
net/netfilter/nfnetlink_queue.c
557
htonl(from_kuid_munged(&init_user_ns, cred->fsuid))))
net/netfilter/nfnetlink_queue.c
560
htonl(from_kgid_munged(&init_user_ns, cred->fsgid))))
net/rxrpc/key.c
647
const struct cred *cred = current_cred();
net/rxrpc/key.c
659
GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred, 0,
net/rxrpc/key.c
703
const struct cred *cred = current_cred();
net/rxrpc/key.c
708
GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred,
net/rxrpc/rxgk_app.c
143
GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred, // TODO: Use socket owner
net/rxrpc/rxgk_app.c
47
const struct cred *cred = current_cred(); // TODO - use socket creds
net/sunrpc/auth.c
261
rpcauth_unhash_cred_locked(struct rpc_cred *cred)
net/sunrpc/auth.c
263
if (!test_and_clear_bit(RPCAUTH_CRED_HASHED, &cred->cr_flags))
net/sunrpc/auth.c
265
hlist_del_rcu(&cred->cr_hash);
net/sunrpc/auth.c
270
rpcauth_unhash_cred(struct rpc_cred *cred)
net/sunrpc/auth.c
275
if (!test_bit(RPCAUTH_CRED_HASHED, &cred->cr_flags))
net/sunrpc/auth.c
277
cache_lock = &cred->cr_auth->au_credcache->lock;
net/sunrpc/auth.c
279
ret = rpcauth_unhash_cred_locked(cred);
net/sunrpc/auth.c
312
rpcauth_stringify_acceptor(struct rpc_cred *cred)
net/sunrpc/auth.c
314
if (!cred->cr_ops->crstringify_acceptor)
net/sunrpc/auth.c
316
return cred->cr_ops->crstringify_acceptor(cred);
net/sunrpc/auth.c
326
struct rpc_cred *cred;
net/sunrpc/auth.c
329
cred = list_entry(head->next, struct rpc_cred, cr_lru);
net/sunrpc/auth.c
330
list_del_init(&cred->cr_lru);
net/sunrpc/auth.c
331
put_rpccred(cred);
net/sunrpc/auth.c
336
rpcauth_lru_add_locked(struct rpc_cred *cred)
net/sunrpc/auth.c
338
if (!list_empty(&cred->cr_lru))
net/sunrpc/auth.c
341
list_add_tail(&cred->cr_lru, &cred_unused);
net/sunrpc/auth.c
345
rpcauth_lru_add(struct rpc_cred *cred)
net/sunrpc/auth.c
347
if (!list_empty(&cred->cr_lru))
net/sunrpc/auth.c
350
rpcauth_lru_add_locked(cred);
net/sunrpc/auth.c
355
rpcauth_lru_remove_locked(struct rpc_cred *cred)
net/sunrpc/auth.c
357
if (list_empty(&cred->cr_lru))
net/sunrpc/auth.c
360
list_del_init(&cred->cr_lru);
net/sunrpc/auth.c
364
rpcauth_lru_remove(struct rpc_cred *cred)
net/sunrpc/auth.c
366
if (list_empty(&cred->cr_lru))
net/sunrpc/auth.c
369
rpcauth_lru_remove_locked(cred);
net/sunrpc/auth.c
382
struct rpc_cred *cred;
net/sunrpc/auth.c
391
cred = hlist_entry(head->first, struct rpc_cred, cr_hash);
net/sunrpc/auth.c
392
rpcauth_unhash_cred_locked(cred);
net/sunrpc/auth.c
394
rpcauth_lru_remove_locked(cred);
net/sunrpc/auth.c
395
list_add_tail(&cred->cr_lru, &free);
net/sunrpc/auth.c
41
static struct cred machine_cred = {
net/sunrpc/auth.c
429
struct rpc_cred *cred, *next;
net/sunrpc/auth.c
433
list_for_each_entry_safe(cred, next, &cred_unused, cr_lru) {
net/sunrpc/auth.c
437
if (refcount_read(&cred->cr_count) > 1) {
net/sunrpc/auth.c
438
rpcauth_lru_remove_locked(cred);
net/sunrpc/auth.c
445
if (time_in_range(cred->cr_expire, expired, jiffies))
net/sunrpc/auth.c
447
if (!rpcauth_unhash_cred(cred))
net/sunrpc/auth.c
450
rpcauth_lru_remove_locked(cred);
net/sunrpc/auth.c
452
list_add_tail(&cred->cr_lru, free);
net/sunrpc/auth.c
49
const struct cred *rpc_machine_cred(void)
net/sunrpc/auth.c
519
struct rpc_cred *cred = NULL,
net/sunrpc/auth.c
529
cred = get_rpccred(entry);
net/sunrpc/auth.c
530
if (cred)
net/sunrpc/auth.c
535
if (cred != NULL)
net/sunrpc/auth.c
540
cred = new;
net/sunrpc/auth.c
548
cred = get_rpccred(entry);
net/sunrpc/auth.c
549
if (cred)
net/sunrpc/auth.c
552
if (cred == NULL) {
net/sunrpc/auth.c
553
cred = new;
net/sunrpc/auth.c
554
set_bit(RPCAUTH_CRED_HASHED, &cred->cr_flags);
net/sunrpc/auth.c
555
refcount_inc(&cred->cr_count);
net/sunrpc/auth.c
556
hlist_add_head_rcu(&cred->cr_hash, &cache->hashtable[nr]);
net/sunrpc/auth.c
562
if (test_bit(RPCAUTH_CRED_NEW, &cred->cr_flags) &&
net/sunrpc/auth.c
563
cred->cr_ops->cr_init != NULL &&
net/sunrpc/auth.c
565
int res = cred->cr_ops->cr_init(auth, cred);
net/sunrpc/auth.c
567
put_rpccred(cred);
net/sunrpc/auth.c
568
cred = ERR_PTR(res);
net/sunrpc/auth.c
573
return cred;
net/sunrpc/auth.c
582
const struct cred *cred = current_cred();
net/sunrpc/auth.c
585
acred.cred = cred;
net/sunrpc/auth.c
592
rpcauth_init_cred(struct rpc_cred *cred, const struct auth_cred *acred,
net/sunrpc/auth.c
595
INIT_HLIST_NODE(&cred->cr_hash);
net/sunrpc/auth.c
596
INIT_LIST_HEAD(&cred->cr_lru);
net/sunrpc/auth.c
597
refcount_set(&cred->cr_count, 1);
net/sunrpc/auth.c
598
cred->cr_auth = auth;
net/sunrpc/auth.c
599
cred->cr_flags = 0;
net/sunrpc/auth.c
600
cred->cr_ops = ops;
net/sunrpc/auth.c
601
cred->cr_expire = jiffies;
net/sunrpc/auth.c
602
cred->cr_cred = get_cred(acred->cred);
net/sunrpc/auth.c
611
.cred = get_task_cred(&init_task),
net/sunrpc/auth.c
618
put_cred(acred.cred);
net/sunrpc/auth.c
628
.cred = init_task.cred,
net/sunrpc/auth.c
647
rpcauth_bindcred(struct rpc_task *task, const struct cred *cred, int flags)
net/sunrpc/auth.c
654
.cred = cred,
net/sunrpc/auth.c
662
else if (cred != NULL && cred != &machine_cred)
net/sunrpc/auth.c
664
else if (cred == &machine_cred)
net/sunrpc/auth.c
670
else if (cred == &machine_cred)
net/sunrpc/auth.c
684
put_rpccred(struct rpc_cred *cred)
net/sunrpc/auth.c
686
if (cred == NULL)
net/sunrpc/auth.c
689
if (refcount_dec_and_test(&cred->cr_count))
net/sunrpc/auth.c
691
if (refcount_read(&cred->cr_count) != 1 ||
net/sunrpc/auth.c
692
!test_bit(RPCAUTH_CRED_HASHED, &cred->cr_flags))
net/sunrpc/auth.c
694
if (test_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags) != 0) {
net/sunrpc/auth.c
695
cred->cr_expire = jiffies;
net/sunrpc/auth.c
696
rpcauth_lru_add(cred);
net/sunrpc/auth.c
698
if (unlikely(!test_bit(RPCAUTH_CRED_HASHED, &cred->cr_flags)))
net/sunrpc/auth.c
699
rpcauth_lru_remove(cred);
net/sunrpc/auth.c
700
} else if (rpcauth_unhash_cred(cred)) {
net/sunrpc/auth.c
701
rpcauth_lru_remove(cred);
net/sunrpc/auth.c
702
if (refcount_dec_and_test(&cred->cr_count))
net/sunrpc/auth.c
710
cred->cr_ops->crdestroy(cred);
net/sunrpc/auth.c
820
struct rpc_cred *cred = task->tk_rqstp->rq_cred;
net/sunrpc/auth.c
822
if (!cred || !cred->cr_ops->crneed_reencode)
net/sunrpc/auth.c
824
return cred->cr_ops->crneed_reencode(task);
net/sunrpc/auth.c
830
struct rpc_cred *cred;
net/sunrpc/auth.c
833
cred = task->tk_rqstp->rq_cred;
net/sunrpc/auth.c
834
if (cred == NULL) {
net/sunrpc/auth.c
838
cred = task->tk_rqstp->rq_cred;
net/sunrpc/auth.c
841
err = cred->cr_ops->crrefresh(task);
net/sunrpc/auth.c
851
struct rpc_cred *cred = task->tk_rqstp->rq_cred;
net/sunrpc/auth.c
853
if (cred)
net/sunrpc/auth.c
854
clear_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags);
net/sunrpc/auth.c
860
struct rpc_cred *cred = task->tk_rqstp->rq_cred;
net/sunrpc/auth.c
862
return cred == NULL ||
net/sunrpc/auth.c
863
test_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags) != 0;
net/sunrpc/auth_gss/auth_gss.c
1252
.cred = gss_cred->gc_base.cr_cred,
net/sunrpc/auth_gss/auth_gss.c
1277
gss_send_destroy_context(struct rpc_cred *cred)
net/sunrpc/auth_gss/auth_gss.c
1279
struct gss_cred *gss_cred = container_of(cred, struct gss_cred, gc_base);
net/sunrpc/auth_gss/auth_gss.c
1280
struct gss_auth *gss_auth = container_of(cred->cr_auth, struct gss_auth, rpc_auth);
net/sunrpc/auth_gss/auth_gss.c
1338
gss_destroy_nullcred(struct rpc_cred *cred)
net/sunrpc/auth_gss/auth_gss.c
1340
struct gss_cred *gss_cred = container_of(cred, struct gss_cred, gc_base);
net/sunrpc/auth_gss/auth_gss.c
1341
struct gss_auth *gss_auth = container_of(cred->cr_auth, struct gss_auth, rpc_auth);
net/sunrpc/auth_gss/auth_gss.c
1345
put_cred(cred->cr_cred);
net/sunrpc/auth_gss/auth_gss.c
1346
call_rcu(&cred->cr_rcu, gss_free_cred_callback);
net/sunrpc/auth_gss/auth_gss.c
135
gss_cred_set_ctx(struct rpc_cred *cred, struct gss_cl_ctx *ctx)
net/sunrpc/auth_gss/auth_gss.c
1353
gss_destroy_cred(struct rpc_cred *cred)
net/sunrpc/auth_gss/auth_gss.c
1355
if (test_and_clear_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags) != 0)
net/sunrpc/auth_gss/auth_gss.c
1356
gss_send_destroy_context(cred);
net/sunrpc/auth_gss/auth_gss.c
1357
gss_destroy_nullcred(cred);
net/sunrpc/auth_gss/auth_gss.c
1363
return hash_64(from_kuid(&init_user_ns, acred->cred->fsuid), hashbits);
net/sunrpc/auth_gss/auth_gss.c
137
struct gss_cred *gss_cred = container_of(cred, struct gss_cred, gc_base);
net/sunrpc/auth_gss/auth_gss.c
1380
struct gss_cred *cred = NULL;
net/sunrpc/auth_gss/auth_gss.c
1383
if (!(cred = kzalloc_obj(*cred, gfp)))
net/sunrpc/auth_gss/auth_gss.c
1386
rpcauth_init_cred(&cred->gc_base, acred, auth, &gss_credops);
net/sunrpc/auth_gss/auth_gss.c
139
if (!test_bit(RPCAUTH_CRED_NEW, &cred->cr_flags))
net/sunrpc/auth_gss/auth_gss.c
1391
cred->gc_base.cr_flags = 1UL << RPCAUTH_CRED_NEW;
net/sunrpc/auth_gss/auth_gss.c
1392
cred->gc_service = gss_auth->service;
net/sunrpc/auth_gss/auth_gss.c
1393
cred->gc_principal = acred->principal;
net/sunrpc/auth_gss/auth_gss.c
1395
return &cred->gc_base;
net/sunrpc/auth_gss/auth_gss.c
1402
gss_cred_init(struct rpc_auth *auth, struct rpc_cred *cred)
net/sunrpc/auth_gss/auth_gss.c
1405
struct gss_cred *gss_cred = container_of(cred,struct gss_cred, gc_base);
net/sunrpc/auth_gss/auth_gss.c
1415
gss_stringify_acceptor(struct rpc_cred *cred)
net/sunrpc/auth_gss/auth_gss.c
1418
struct gss_cred *gss_cred = container_of(cred, struct gss_cred, gc_base);
net/sunrpc/auth_gss/auth_gss.c
143
set_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags);
net/sunrpc/auth_gss/auth_gss.c
145
clear_bit(RPCAUTH_CRED_NEW, &cred->cr_flags);
net/sunrpc/auth_gss/auth_gss.c
149
gss_cred_get_ctx(struct rpc_cred *cred)
net/sunrpc/auth_gss/auth_gss.c
151
struct gss_cred *gss_cred = container_of(cred, struct gss_cred, gc_base);
net/sunrpc/auth_gss/auth_gss.c
1517
ret = uid_eq(rc->cr_cred->fsuid, acred->cred->fsuid);
net/sunrpc/auth_gss/auth_gss.c
1532
struct rpc_cred *cred = req->rq_cred;
net/sunrpc/auth_gss/auth_gss.c
1533
struct gss_cred *gss_cred = container_of(cred, struct gss_cred,
net/sunrpc/auth_gss/auth_gss.c
1535
struct gss_cl_ctx *ctx = gss_cred_get_ctx(cred);
net/sunrpc/auth_gss/auth_gss.c
1593
clear_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags);
net/sunrpc/auth_gss/auth_gss.c
1613
.cred = oldcred->cr_cred,
net/sunrpc/auth_gss/auth_gss.c
1627
static int gss_cred_is_negative_entry(struct rpc_cred *cred)
net/sunrpc/auth_gss/auth_gss.c
1629
if (test_bit(RPCAUTH_CRED_NEGATIVE, &cred->cr_flags)) {
net/sunrpc/auth_gss/auth_gss.c
1634
gss_cred = container_of(cred, struct gss_cred, gc_base);
net/sunrpc/auth_gss/auth_gss.c
1650
struct rpc_cred *cred = task->tk_rqstp->rq_cred;
net/sunrpc/auth_gss/auth_gss.c
1653
if (gss_cred_is_negative_entry(cred))
net/sunrpc/auth_gss/auth_gss.c
1656
if (!test_bit(RPCAUTH_CRED_NEW, &cred->cr_flags) &&
net/sunrpc/auth_gss/auth_gss.c
1657
!test_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags)) {
net/sunrpc/auth_gss/auth_gss.c
1661
cred = task->tk_rqstp->rq_cred;
net/sunrpc/auth_gss/auth_gss.c
1664
if (test_bit(RPCAUTH_CRED_NEW, &cred->cr_flags))
net/sunrpc/auth_gss/auth_gss.c
1696
struct rpc_cred *cred = task->tk_rqstp->rq_cred;
net/sunrpc/auth_gss/auth_gss.c
1697
struct gss_cl_ctx *ctx = gss_cred_get_ctx(cred);
net/sunrpc/auth_gss/auth_gss.c
1723
clear_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags);
net/sunrpc/auth_gss/auth_gss.c
1729
if (test_bit(RPCAUTH_AUTH_UPDATE_SLACK, &cred->cr_auth->au_flags))
net/sunrpc/auth_gss/auth_gss.c
1730
cred->cr_auth->au_verfsize = XDR_QUADLEN(len) + 2;
net/sunrpc/auth_gss/auth_gss.c
1747
gss_wrap_req_integ(struct rpc_cred *cred, struct gss_cl_ctx *ctx,
net/sunrpc/auth_gss/auth_gss.c
1777
clear_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags);
net/sunrpc/auth_gss/auth_gss.c
1838
gss_wrap_req_priv(struct rpc_cred *cred, struct gss_cl_ctx *ctx,
net/sunrpc/auth_gss/auth_gss.c
1890
clear_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags);
net/sunrpc/auth_gss/auth_gss.c
1916
struct rpc_cred *cred = task->tk_rqstp->rq_cred;
net/sunrpc/auth_gss/auth_gss.c
1917
struct gss_cred *gss_cred = container_of(cred, struct gss_cred,
net/sunrpc/auth_gss/auth_gss.c
1919
struct gss_cl_ctx *ctx = gss_cred_get_ctx(cred);
net/sunrpc/auth_gss/auth_gss.c
1935
status = gss_wrap_req_integ(cred, ctx, task, xdr);
net/sunrpc/auth_gss/auth_gss.c
1938
status = gss_wrap_req_priv(cred, ctx, task, xdr);
net/sunrpc/auth_gss/auth_gss.c
1956
static void gss_update_rslack(struct rpc_task *task, struct rpc_cred *cred,
net/sunrpc/auth_gss/auth_gss.c
1959
struct rpc_auth *auth = cred->cr_auth;
net/sunrpc/auth_gss/auth_gss.c
1969
gss_unwrap_resp_auth(struct rpc_task *task, struct rpc_cred *cred)
net/sunrpc/auth_gss/auth_gss.c
1971
gss_update_rslack(task, cred, 0, 0);
net/sunrpc/auth_gss/auth_gss.c
1989
gss_unwrap_resp_integ(struct rpc_task *task, struct rpc_cred *cred,
net/sunrpc/auth_gss/auth_gss.c
2038
clear_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags);
net/sunrpc/auth_gss/auth_gss.c
2042
gss_update_rslack(task, cred, 2, 2 + 1 + XDR_QUADLEN(mic.len));
net/sunrpc/auth_gss/auth_gss.c
2061
gss_unwrap_resp_priv(struct rpc_task *task, struct rpc_cred *cred,
net/sunrpc/auth_gss/auth_gss.c
2081
clear_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags);
net/sunrpc/auth_gss/auth_gss.c
2093
gss_update_rslack(task, cred, 2 + ctx->gc_gss_ctx->align,
net/sunrpc/auth_gss/auth_gss.c
2118
struct rpc_cred *cred = req->rq_cred;
net/sunrpc/auth_gss/auth_gss.c
2119
struct gss_cl_ctx *ctx = gss_cred_get_ctx(cred);
net/sunrpc/auth_gss/auth_gss.c
2155
struct rpc_cred *cred = rqstp->rq_cred;
net/sunrpc/auth_gss/auth_gss.c
2156
struct gss_cred *gss_cred = container_of(cred, struct gss_cred,
net/sunrpc/auth_gss/auth_gss.c
2158
struct gss_cl_ctx *ctx = gss_cred_get_ctx(cred);
net/sunrpc/auth_gss/auth_gss.c
2165
status = gss_unwrap_resp_auth(task, cred);
net/sunrpc/auth_gss/auth_gss.c
2168
status = gss_unwrap_resp_integ(task, cred, ctx, rqstp, xdr);
net/sunrpc/auth_gss/auth_gss.c
2171
status = gss_unwrap_resp_priv(task, cred, ctx, rqstp, xdr);
net/sunrpc/auth_gss/auth_gss.c
408
const struct cred *cred)
net/sunrpc/auth_gss/auth_gss.c
410
struct user_namespace *userns = cred->user_ns;
net/sunrpc/auth_gss/auth_gss.c
435
const struct cred *cred)
net/sunrpc/auth_gss/auth_gss.c
437
struct user_namespace *userns = cred->user_ns;
net/sunrpc/auth_gss/auth_gss.c
565
gss_setup_upcall(struct gss_auth *gss_auth, struct rpc_cred *cred)
net/sunrpc/auth_gss/auth_gss.c
567
struct gss_cred *gss_cred = container_of(cred,
net/sunrpc/auth_gss/auth_gss.c
570
kuid_t uid = cred->cr_cred->fsuid;
net/sunrpc/auth_gss/auth_gss.c
599
struct rpc_cred *cred = task->tk_rqstp->rq_cred;
net/sunrpc/auth_gss/auth_gss.c
600
struct gss_auth *gss_auth = container_of(cred->cr_auth,
net/sunrpc/auth_gss/auth_gss.c
602
struct gss_cred *gss_cred = container_of(cred,
net/sunrpc/auth_gss/auth_gss.c
608
gss_msg = gss_setup_upcall(gss_auth, cred);
net/sunrpc/auth_gss/auth_gss.c
639
cred->cr_cred->fsuid), err);
net/sunrpc/auth_gss/auth_gss.c
649
struct rpc_cred *cred = &gss_cred->gc_base;
net/sunrpc/auth_gss/auth_gss.c
662
gss_msg = gss_setup_upcall(gss_auth, cred);
net/sunrpc/auth_gss/auth_gss.c
694
gss_cred_set_ctx(cred, gss_msg->ctx);
net/sunrpc/auth_gss/auth_gss.c
704
cred->cr_cred->fsuid), err);
net/sunrpc/auth_gss/gss_rpc_xdr.c
575
struct gssx_cred *cred)
net/sunrpc/auth_gss/gss_rpc_xdr.c
580
err = gssx_enc_name(xdr, &cred->desired_name);
net/sunrpc/auth_gss/gss_rpc_xdr.c
585
err = dummy_enc_credel_array(xdr, &cred->elements);
net/sunrpc/auth_gss/gss_rpc_xdr.c
590
err = gssx_enc_buffer(xdr, &cred->cred_handle_reference);
net/sunrpc/auth_gss/gss_rpc_xdr.c
595
err = gssx_enc_bool(xdr, cred->needs_release);
net/sunrpc/auth_gss/svcauth_gss.c
1256
rsci.cred = ud->creds;
net/sunrpc/auth_gss/svcauth_gss.c
1264
rsci.cred.cr_gss_mech = gm;
net/sunrpc/auth_gss/svcauth_gss.c
1696
rqstp->rq_cred = rsci->cred;
net/sunrpc/auth_gss/svcauth_gss.c
1697
get_group_info(rsci->cred.cr_group_info);
net/sunrpc/auth_gss/svcauth_gss.c
371
struct svc_cred cred;
net/sunrpc/auth_gss/svcauth_gss.c
385
free_svc_cred(&rsci->cred);
net/sunrpc/auth_gss/svcauth_gss.c
402
free_svc_cred(&rsci->cred);
net/sunrpc/auth_gss/svcauth_gss.c
432
init_svc_cred(&new->cred);
net/sunrpc/auth_gss/svcauth_gss.c
445
new->cred = tmp->cred;
net/sunrpc/auth_gss/svcauth_gss.c
446
init_svc_cred(&tmp->cred);
net/sunrpc/auth_gss/svcauth_gss.c
513
rsci.cred.cr_uid = make_kuid(current_user_ns(), id);
net/sunrpc/auth_gss/svcauth_gss.c
518
rsci.cred.cr_gid = make_kgid(current_user_ns(), id);
net/sunrpc/auth_gss/svcauth_gss.c
526
rsci.cred.cr_group_info = groups_alloc(N);
net/sunrpc/auth_gss/svcauth_gss.c
527
if (rsci.cred.cr_group_info == NULL)
net/sunrpc/auth_gss/svcauth_gss.c
539
rsci.cred.cr_group_info->gid[i] = kgid;
net/sunrpc/auth_gss/svcauth_gss.c
541
groups_sort(rsci.cred.cr_group_info);
net/sunrpc/auth_gss/svcauth_gss.c
547
gm = rsci.cred.cr_gss_mech = gss_mech_get_by_name(buf);
net/sunrpc/auth_gss/svcauth_gss.c
565
rsci.cred.cr_principal = kstrdup(buf, GFP_KERNEL);
net/sunrpc/auth_gss/svcauth_gss.c
566
if (!rsci.cred.cr_principal) {
net/sunrpc/auth_null.c
46
nul_destroy_cred(struct rpc_cred *cred)
net/sunrpc/auth_null.c
54
nul_match(struct auth_cred *acred, struct rpc_cred *cred, int taskflags)
net/sunrpc/auth_tls.c
90
static void tls_destroy_cred(struct rpc_cred *cred)
net/sunrpc/auth_tls.c
94
static int tls_match(struct auth_cred *acred, struct rpc_cred *cred, int taskflags)
net/sunrpc/auth_unix.c
101
if (!gid_eq(cred->cr_cred->group_info->gid[i], acred->cred->group_info->gid[i]))
net/sunrpc/auth_unix.c
114
struct rpc_cred *cred = task->tk_rqstp->rq_cred;
net/sunrpc/auth_unix.c
117
struct group_info *gi = cred->cr_cred->group_info;
net/sunrpc/auth_unix.c
135
*p++ = cpu_to_be32(from_kuid_munged(userns, cred->cr_cred->fsuid));
net/sunrpc/auth_unix.c
136
*p++ = cpu_to_be32(from_kgid_munged(userns, cred->cr_cred->fsgid));
net/sunrpc/auth_unix.c
71
unx_destroy_cred(struct rpc_cred *cred)
net/sunrpc/auth_unix.c
73
call_rcu(&cred->cr_rcu, unx_free_cred_callback);
net/sunrpc/auth_unix.c
80
unx_match(struct auth_cred *acred, struct rpc_cred *cred, int flags)
net/sunrpc/auth_unix.c
85
if (cred->cr_cred == acred->cred)
net/sunrpc/auth_unix.c
88
if (!uid_eq(cred->cr_cred->fsuid, acred->cred->fsuid) || !gid_eq(cred->cr_cred->fsgid, acred->cred->fsgid))
net/sunrpc/auth_unix.c
91
if (acred->cred->group_info != NULL)
net/sunrpc/auth_unix.c
92
groups = acred->cred->group_info->ngroups;
net/sunrpc/auth_unix.c
95
if (cred->cr_cred->group_info == NULL)
net/sunrpc/auth_unix.c
97
if (groups != cred->cr_cred->group_info->ngroups)
net/sunrpc/clnt.c
1064
.cred = old->cl_cred,
net/sunrpc/clnt.c
2704
struct rpc_cred *cred = task->tk_rqstp->rq_cred;
net/sunrpc/clnt.c
2706
if (!test_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags)) {
net/sunrpc/clnt.c
2861
struct rpc_xprt *xprt, struct rpc_cred *cred, int flags,
net/sunrpc/clnt.c
2871
.rpc_op_cred = cred,
net/sunrpc/clnt.c
2881
struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred, int flags)
net/sunrpc/clnt.c
2883
return rpc_call_null_helper(clnt, NULL, cred, flags, NULL, NULL);
net/sunrpc/clnt.c
387
clnt->cl_cred = get_cred(args->cred);
net/sunrpc/clnt.c
680
.cred = clnt->cl_cred,
net/sunrpc/clnt.c
703
.cred = clnt->cl_cred,
net/sunrpc/rpcb_clnt.c
240
.cred = current_cred(),
net/sunrpc/rpcb_clnt.c
314
.cred = current_cred(),
net/sunrpc/rpcb_clnt.c
370
const struct cred *cred,
net/sunrpc/rpcb_clnt.c
384
.cred = cred,
net/sunrpc/svc_xprt.c
253
size_t len, int flags, const struct cred *cred)
net/sunrpc/svc_xprt.c
277
newxprt->xpt_cred = get_cred(cred);
net/sunrpc/svc_xprt.c
302
int flags, const struct cred *cred)
net/sunrpc/svc_xprt.c
320
err = _svc_xprt_create(serv, xprt_name, net, sap, len, flags, cred);
net/sunrpc/svc_xprt.c
324
cred);
net/sunrpc/svc_xprt.c
346
const struct cred *cred)
net/sunrpc/svc_xprt.c
375
return svc_xprt_create_from_sa(serv, xprt_name, net, sap, flags, cred);
net/sunrpc/svcauth.c
187
const struct cred *cred,
net/sunrpc/svcauth.c
195
svc->cr_uid = KUIDT_INIT(from_kuid_munged(userns, cred->fsuid));
net/sunrpc/svcauth.c
196
svc->cr_gid = KGIDT_INIT(from_kgid_munged(userns, cred->fsgid));
net/sunrpc/svcauth.c
198
if (cred->group_info)
net/sunrpc/svcauth.c
199
svc->cr_group_info = get_group_info(cred->group_info);
net/sunrpc/svcauth_unix.c
675
struct svc_cred *cred = &rqstp->rq_cred;
net/sunrpc/svcauth_unix.c
723
gi = unix_gid_find(cred->cr_uid, rqstp);
net/sunrpc/svcauth_unix.c
732
put_group_info(cred->cr_group_info);
net/sunrpc/svcauth_unix.c
733
cred->cr_group_info = gi;
net/sunrpc/svcauth_unix.c
758
struct svc_cred *cred = &rqstp->rq_cred;
net/sunrpc/svcauth_unix.c
779
cred->cr_uid = INVALID_UID;
net/sunrpc/svcauth_unix.c
780
cred->cr_gid = INVALID_GID;
net/sunrpc/svcauth_unix.c
781
cred->cr_group_info = groups_alloc(0);
net/sunrpc/svcauth_unix.c
782
if (cred->cr_group_info == NULL)
net/sunrpc/svcauth_unix.c
835
struct svc_cred *cred = &rqstp->rq_cred;
net/sunrpc/svcauth_unix.c
864
cred->cr_uid = INVALID_UID;
net/sunrpc/svcauth_unix.c
865
cred->cr_gid = INVALID_GID;
net/sunrpc/svcauth_unix.c
866
cred->cr_group_info = groups_alloc(0);
net/sunrpc/svcauth_unix.c
867
if (cred->cr_group_info == NULL)
net/sunrpc/svcauth_unix.c
920
struct svc_cred *cred = &rqstp->rq_cred;
net/sunrpc/svcauth_unix.c
951
cred->cr_uid = make_kuid(userns, i);
net/sunrpc/svcauth_unix.c
954
cred->cr_gid = make_kgid(userns, i);
net/sunrpc/svcauth_unix.c
963
cred->cr_group_info = groups_alloc(len);
net/sunrpc/svcauth_unix.c
964
if (cred->cr_group_info == NULL)
net/sunrpc/svcauth_unix.c
968
cred->cr_group_info->gid[i] = kgid;
net/sunrpc/svcauth_unix.c
970
groups_sort(cred->cr_group_info);
net/sunrpc/svcsock.c
1505
char *name_return, const size_t len, const struct cred *cred)
net/sunrpc/svcsock.c
1541
svsk->sk_xprt.xpt_cred = get_cred(cred);
net/sunrpc/xprtsock.c
2703
.cred = upper_clnt->cl_cred,
net/unix/af_unix.c
741
const struct cred *peer_cred;
net/unix/af_unix.c
760
const struct cred *cred = NULL;
net/unix/af_unix.c
766
swap(peercred->peer_cred, cred);
net/unix/af_unix.c
769
put_cred(cred);
net/unix/af_unix.c
781
const struct cred *old_cred;
rust/helpers/cred.c
10
__rust_helper void rust_helper_put_cred(const struct cred *cred)
rust/helpers/cred.c
12
put_cred(cred);
rust/helpers/cred.c
5
__rust_helper const struct cred *rust_helper_get_cred(const struct cred *cred)
rust/helpers/cred.c
7
return get_cred(cred);
rust/helpers/security.c
24
rust_helper_security_binder_set_context_mgr(const struct cred *mgr)
rust/helpers/security.c
30
rust_helper_security_binder_transaction(const struct cred *from,
rust/helpers/security.c
31
const struct cred *to)
rust/helpers/security.c
37
rust_helper_security_binder_transfer_binder(const struct cred *from,
rust/helpers/security.c
38
const struct cred *to)
rust/helpers/security.c
44
const struct cred *from, const struct cred *to, const struct file *file)
rust/helpers/security.c
6
__rust_helper void rust_helper_security_cred_getsecid(const struct cred *c,
security/apparmor/af_unix.c
33
static int unix_fs_perm(const char *op, u32 mask, const struct cred *subj_cred,
security/apparmor/af_unix.c
445
static int aa_unix_label_sk_perm(const struct cred *subj_cred,
security/apparmor/af_unix.c
600
static int unix_peer_perm(const struct cred *subj_cred,
security/apparmor/af_unix.c
623
int aa_unix_peer_perm(const struct cred *subj_cred,
security/apparmor/af_unix.c
709
int aa_unix_file_perm(const struct cred *subj_cred, struct aa_label *label,
security/apparmor/apparmorfs.c
495
const struct cred *ocred)
security/apparmor/capability.c
179
int aa_capable(const struct cred *subj_cred, struct aa_label *label,
security/apparmor/capability.c
35
const struct cred *ad_subj_cred;
security/apparmor/domain.c
1003
error = may_change_ptraced_domain(bprm->cred, new, &info);
security/apparmor/domain.c
1028
aa_put_label(cred_label(bprm->cred));
security/apparmor/domain.c
1030
set_cred_label(bprm->cred, new);
security/apparmor/domain.c
1057
static struct aa_label *build_change_hat(const struct cred *subj_cred,
security/apparmor/domain.c
1107
static struct aa_label *change_hat(const struct cred *subj_cred,
security/apparmor/domain.c
1225
const struct cred *subj_cred;
security/apparmor/domain.c
1353
const struct cred *subj_cred,
security/apparmor/domain.c
1399
const struct cred *subj_cred = get_current_cred();
security/apparmor/domain.c
48
static int may_change_ptraced_domain(const struct cred *to_cred,
security/apparmor/domain.c
54
const struct cred *tracer_cred = NULL;
security/apparmor/domain.c
659
static struct aa_label *profile_transition(const struct cred *subj_cred,
security/apparmor/domain.c
792
static int profile_onexec(const struct cred *subj_cred,
security/apparmor/domain.c
867
static struct aa_label *handle_onexec(const struct cred *subj_cred,
security/apparmor/domain.c
923
const struct cred *subj_cred;
security/apparmor/domain.c
938
AA_BUG(!cred_label(bprm->cred));
security/apparmor/domain.c
941
label = aa_get_newest_label(cred_label(bprm->cred));
security/apparmor/file.c
149
static int path_name(const char *op, const struct cred *subj_cred,
security/apparmor/file.c
226
int __aa_path_perm(const char *op, const struct cred *subj_cred,
security/apparmor/file.c
247
static int profile_path_perm(const char *op, const struct cred *subj_cred,
security/apparmor/file.c
280
int aa_path_perm(const char *op, const struct cred *subj_cred,
security/apparmor/file.c
324
static int profile_path_link(const struct cred *subj_cred,
security/apparmor/file.c
430
int aa_path_link(const struct cred *subj_cred,
security/apparmor/file.c
483
static int __file_path_perm(const char *op, const struct cred *subj_cred,
security/apparmor/file.c
544
static int __file_sock_perm(const char *op, const struct cred *subj_cred,
security/apparmor/file.c
619
int aa_file_perm(const char *op, const struct cred *subj_cred,
security/apparmor/file.c
673
static void revalidate_tty(const struct cred *subj_cred, struct aa_label *label)
security/apparmor/file.c
703
const struct cred *cred;
security/apparmor/file.c
711
if (aa_file_perm(OP_INHERIT, cl->cred, cl->label, file,
security/apparmor/file.c
719
void aa_inherit_files(const struct cred *cred, struct files_struct *files)
security/apparmor/file.c
721
struct aa_label *label = aa_get_newest_cred_label(cred);
security/apparmor/file.c
723
.cred = cred,
security/apparmor/file.c
729
revalidate_tty(cred, label);
security/apparmor/file.c
736
devnull = dentry_open(&aa_null, O_RDWR, cred);
security/apparmor/file.c
95
int aa_audit_file(const struct cred *subj_cred,
security/apparmor/include/af_unix.h
35
int aa_unix_peer_perm(const struct cred *subj_cred,
security/apparmor/include/af_unix.h
52
int aa_unix_file_perm(const struct cred *subj_cred, struct aa_label *label,
security/apparmor/include/audit.h
116
const struct cred *subj_cred;
security/apparmor/include/capability.h
40
int aa_capable(const struct cred *subj_cred, struct aa_label *label,
security/apparmor/include/cred.h
149
static inline struct aa_label *__begin_cred_crit_section(const struct cred *cred,
security/apparmor/include/cred.h
152
struct aa_label *label = cred_label(cred);
security/apparmor/include/cred.h
22
static inline struct aa_label *cred_label(const struct cred *cred)
security/apparmor/include/cred.h
24
struct aa_label **blob = cred->security + apparmor_blob_sizes.lbs_cred;
security/apparmor/include/cred.h
30
static inline void set_cred_label(const struct cred *cred,
security/apparmor/include/cred.h
33
struct aa_label **blob = cred->security + apparmor_blob_sizes.lbs_cred;
security/apparmor/include/cred.h
45
static inline struct aa_label *aa_get_newest_cred_label(const struct cred *cred)
security/apparmor/include/cred.h
47
return aa_get_newest_label(cred_label(cred));
security/apparmor/include/cred.h
50
static inline struct aa_label *aa_get_newest_cred_label_condref(const struct cred *cred,
security/apparmor/include/cred.h
53
struct aa_label *l = cred_label(cred);
security/apparmor/include/file.h
103
void aa_inherit_files(const struct cred *cred, struct files_struct *files);
security/apparmor/include/file.h
74
int aa_audit_file(const struct cred *cred,
security/apparmor/include/file.h
87
int __aa_path_perm(const char *op, const struct cred *subj_cred,
security/apparmor/include/file.h
91
int aa_path_perm(const char *op, const struct cred *subj_cred,
security/apparmor/include/file.h
95
int aa_path_link(const struct cred *subj_cred, struct aa_label *label,
security/apparmor/include/file.h
99
int aa_file_perm(const char *op, const struct cred *subj_cred,
security/apparmor/include/ipc.h
19
int aa_may_signal(const struct cred *subj_cred, struct aa_label *sender,
security/apparmor/include/ipc.h
20
const struct cred *target_cred, struct aa_label *target,
security/apparmor/include/mount.h
28
int aa_remount(const struct cred *subj_cred,
security/apparmor/include/mount.h
32
int aa_bind_mount(const struct cred *subj_cred,
security/apparmor/include/mount.h
37
int aa_mount_change_type(const struct cred *subj_cred,
security/apparmor/include/mount.h
41
int aa_move_mount_old(const struct cred *subj_cred,
security/apparmor/include/mount.h
44
int aa_move_mount(const struct cred *subj_cred,
security/apparmor/include/mount.h
48
int aa_new_mount(const struct cred *subj_cred,
security/apparmor/include/mount.h
53
int aa_umount(const struct cred *subj_cred,
security/apparmor/include/mount.h
56
int aa_pivotroot(const struct cred *subj_cred,
security/apparmor/include/net.h
112
int aa_sock_file_perm(const struct cred *subj_cred, struct aa_label *label,
security/apparmor/include/net.h
99
int aa_af_perm(const struct cred *subj_cred, struct aa_label *label,
security/apparmor/include/policy.h
440
bool aa_policy_view_capable(const struct cred *subj_cred,
security/apparmor/include/policy.h
442
bool aa_policy_admin_capable(const struct cred *subj_cred,
security/apparmor/include/policy.h
444
int aa_may_manage_policy(const struct cred *subj_cred,
security/apparmor/include/policy.h
446
const struct cred *ocred, u32 mask);
security/apparmor/include/resource.h
36
int aa_task_setrlimit(const struct cred *subj_cred, struct aa_label *label,
security/apparmor/include/task.h
94
int aa_may_ptrace(const struct cred *tracer_cred, struct aa_label *tracer,
security/apparmor/include/task.h
95
const struct cred *tracee_cred, struct aa_label *tracee,
security/apparmor/ipc.c
102
int aa_may_signal(const struct cred *subj_cred, struct aa_label *sender,
security/apparmor/ipc.c
103
const struct cred *target_cred, struct aa_label *target,
security/apparmor/ipc.c
78
static int profile_signal_perm(const struct cred *cred,
security/apparmor/ipc.c
90
ad->subj_cred = cred;
security/apparmor/lsm.c
1021
int sig, const struct cred *cred)
security/apparmor/lsm.c
1023
const struct cred *tc;
security/apparmor/lsm.c
1030
if (cred) {
security/apparmor/lsm.c
1034
cl = aa_get_newest_cred_label(cred);
security/apparmor/lsm.c
1035
error = aa_may_signal(cred, cl, tc, tl, sig);
security/apparmor/lsm.c
104
static void apparmor_cred_transfer(struct cred *new, const struct cred *old)
security/apparmor/lsm.c
1048
static int apparmor_userns_create(const struct cred *cred)
security/apparmor/lsm.c
1123
static int unix_connect_perm(const struct cred *cred, struct aa_label *label,
security/apparmor/lsm.c
1129
error = aa_unix_peer_perm(cred, label, OP_CONNECT,
security/apparmor/lsm.c
1136
aa_unix_peer_perm(cred,
security/apparmor/lsm.c
129
const struct cred *cred;
security/apparmor/lsm.c
133
cred = get_task_cred(child);
security/apparmor/lsm.c
134
tracee = cred_label(cred); /* ref count on cred */
security/apparmor/lsm.c
136
error = aa_may_ptrace(current_cred(), tracer, cred, tracee,
security/apparmor/lsm.c
140
put_cred(cred);
security/apparmor/lsm.c
148
const struct cred *cred;
security/apparmor/lsm.c
153
cred = get_task_cred(parent);
security/apparmor/lsm.c
154
tracer = cred_label(cred); /* ref count on cred */
security/apparmor/lsm.c
155
error = aa_may_ptrace(cred, tracer, current_cred(), tracee,
security/apparmor/lsm.c
157
put_cred(cred);
security/apparmor/lsm.c
168
const struct cred *cred;
security/apparmor/lsm.c
171
cred = __task_cred(target);
security/apparmor/lsm.c
172
label = aa_get_newest_cred_label(cred);
security/apparmor/lsm.c
196
static int apparmor_capable(const struct cred *cred, struct user_namespace *ns,
security/apparmor/lsm.c
202
label = aa_get_newest_cred_label(cred);
security/apparmor/lsm.c
204
error = aa_capable(cred, label, cap, opts);
security/apparmor/lsm.c
2255
struct cred *cred = (__force struct cred *)current->real_cred;
security/apparmor/lsm.c
2257
set_cred_label(cred, aa_get_label(ns_unconfined(root_ns)));
security/apparmor/lsm.c
656
static int apparmor_uring_override_creds(const struct cred *new)
security/apparmor/lsm.c
76
static void apparmor_cred_free(struct cred *cred)
security/apparmor/lsm.c
78
aa_put_label(cred_label(cred));
security/apparmor/lsm.c
79
set_cred_label(cred, NULL);
security/apparmor/lsm.c
826
const struct cred *cred = get_task_cred(task);
security/apparmor/lsm.c
831
label = aa_get_newest_label(cred_label(cred));
security/apparmor/lsm.c
843
put_cred(cred);
security/apparmor/lsm.c
85
static int apparmor_cred_alloc_blank(struct cred *cred, gfp_t gfp)
security/apparmor/lsm.c
87
set_cred_label(cred, NULL);
security/apparmor/lsm.c
94
static int apparmor_cred_prepare(struct cred *new, const struct cred *old,
security/apparmor/lsm.c
957
struct aa_label *new_label = cred_label(bprm->cred);
security/apparmor/lsm.c
964
aa_inherit_files(bprm->cred, current->files);
security/apparmor/mount.c
134
static int audit_mount(const struct cred *subj_cred,
security/apparmor/mount.c
305
static int match_mnt_path_str(const struct cred *subj_cred,
security/apparmor/mount.c
366
static int match_mnt(const struct cred *subj_cred,
security/apparmor/mount.c
394
int aa_remount(const struct cred *subj_cred,
security/apparmor/mount.c
420
int aa_bind_mount(const struct cred *subj_cred,
security/apparmor/mount.c
458
int aa_mount_change_type(const struct cred *subj_cred,
security/apparmor/mount.c
485
int aa_move_mount(const struct cred *subj_cred,
security/apparmor/mount.c
517
int aa_move_mount_old(const struct cred *subj_cred, struct aa_label *label,
security/apparmor/mount.c
535
int aa_new_mount(const struct cred *subj_cred, struct aa_label *label,
security/apparmor/mount.c
601
static int profile_umount(const struct cred *subj_cred,
security/apparmor/mount.c
635
int aa_umount(const struct cred *subj_cred, struct aa_label *label,
security/apparmor/mount.c
661
static struct aa_label *build_pivotroot(const struct cred *subj_cred,
security/apparmor/mount.c
716
int aa_pivotroot(const struct cred *subj_cred, struct aa_label *label,
security/apparmor/net.c
272
int aa_af_perm(const struct cred *subj_cred, struct aa_label *label,
security/apparmor/net.c
283
static int aa_label_sk_perm(const struct cred *subj_cred,
security/apparmor/net.c
323
int aa_sock_file_perm(const struct cred *subj_cred, struct aa_label *label,
security/apparmor/policy.c
862
static int policy_ns_capable(const struct cred *subj_cred,
security/apparmor/policy.c
887
bool aa_policy_view_capable(const struct cred *subj_cred,
security/apparmor/policy.c
907
bool aa_policy_admin_capable(const struct cred *subj_cred,
security/apparmor/policy.c
945
static bool is_subset_of_obj_privilege(const struct cred *cred,
security/apparmor/policy.c
947
const struct cred *ocred)
security/apparmor/policy.c
949
if (cred == ocred)
security/apparmor/policy.c
955
if (cred->user_ns != ocred->user_ns)
security/apparmor/policy.c
957
if (!cap_issubset(cred->cap_inheritable, ocred->cap_inheritable))
security/apparmor/policy.c
959
if (!cap_issubset(cred->cap_permitted, ocred->cap_permitted))
security/apparmor/policy.c
961
if (!cap_issubset(cred->cap_effective, ocred->cap_effective))
security/apparmor/policy.c
963
if (!cap_issubset(cred->cap_bset, ocred->cap_bset))
security/apparmor/policy.c
965
if (!cap_issubset(cred->cap_ambient, ocred->cap_ambient))
security/apparmor/policy.c
981
int aa_may_manage_policy(const struct cred *subj_cred, struct aa_label *label,
security/apparmor/policy.c
982
struct aa_ns *ns, const struct cred *ocred, u32 mask)
security/apparmor/resource.c
114
int aa_task_setrlimit(const struct cred *subj_cred, struct aa_label *label,
security/apparmor/resource.c
56
static int audit_resource(const struct cred *subj_cred,
security/apparmor/resource.c
88
static int profile_setrlimit(const struct cred *subj_cred,
security/apparmor/task.c
121
struct cred *new;
security/apparmor/task.c
161
struct cred *new;
security/apparmor/task.c
227
static int profile_ptrace_perm(const struct cred *cred,
security/apparmor/task.c
235
ad->subj_cred = cred;
security/apparmor/task.c
243
static int profile_tracee_perm(const struct cred *cred,
security/apparmor/task.c
252
return profile_ptrace_perm(cred, tracee, tracer, request, ad);
security/apparmor/task.c
255
static int profile_tracer_perm(const struct cred *cred,
security/apparmor/task.c
264
return profile_ptrace_perm(cred, tracer, tracee, request, ad);
security/apparmor/task.c
273
ad->error = aa_capable(cred, &tracer->label, CAP_SYS_PTRACE,
security/apparmor/task.c
289
int aa_may_ptrace(const struct cred *tracer_cred, struct aa_label *tracer,
security/apparmor/task.c
290
const struct cred *tracee_cred, struct aa_label *tracee,
security/apparmor/task.c
51
struct cred *new;
security/commoncap.c
1120
static inline void cap_emulate_setxuid(struct cred *new, const struct cred *old)
security/commoncap.c
1159
int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags)
security/commoncap.c
124
int cap_capable(const struct cred *cred, struct user_namespace *target_ns,
security/commoncap.c
127
const struct user_namespace *cred_ns = cred->user_ns;
security/commoncap.c
1272
struct cred *new;
security/commoncap.c
128
int ret = cap_capable_helper(cred, target_ns, cred_ns, cap);
security/commoncap.c
130
trace_cap_capable(cred, target_ns, cred_ns, cap, ret);
security/commoncap.c
1304
const struct cred *old = current_cred();
security/commoncap.c
1305
struct cred *new;
security/commoncap.c
167
const struct cred *cred, *child_cred;
security/commoncap.c
171
cred = current_cred();
security/commoncap.c
174
caller_caps = &cred->cap_effective;
security/commoncap.c
176
caller_caps = &cred->cap_permitted;
security/commoncap.c
177
if (cred->user_ns == child_cred->user_ns &&
security/commoncap.c
204
const struct cred *cred, *child_cred;
security/commoncap.c
207
cred = __task_cred(parent);
security/commoncap.c
209
if (cred->user_ns == child_cred->user_ns &&
security/commoncap.c
210
cap_issubset(child_cred->cap_permitted, cred->cap_permitted))
security/commoncap.c
233
const struct cred *cred;
security/commoncap.c
237
cred = __task_cred(target);
security/commoncap.c
238
*effective = cred->cap_effective;
security/commoncap.c
239
*inheritable = cred->cap_inheritable;
security/commoncap.c
240
*permitted = cred->cap_permitted;
security/commoncap.c
272
int cap_capset(struct cred *new,
security/commoncap.c
273
const struct cred *old,
security/commoncap.c
631
struct cred *new = bprm->cred;
security/commoncap.c
68
static inline int cap_capable_helper(const struct cred *cred,
security/commoncap.c
769
cap_clear(bprm->cred->cap_permitted);
security/commoncap.c
800
cap_clear(bprm->cred->cap_permitted);
security/commoncap.c
807
static inline bool __is_real(kuid_t uid, struct cred *cred)
security/commoncap.c
808
{ return uid_eq(cred->uid, uid); }
security/commoncap.c
810
static inline bool __is_eff(kuid_t uid, struct cred *cred)
security/commoncap.c
811
{ return uid_eq(cred->euid, uid); }
security/commoncap.c
813
static inline bool __is_suid(kuid_t uid, struct cred *cred)
security/commoncap.c
814
{ return !__is_real(uid, cred) && __is_eff(uid, cred); }
security/commoncap.c
82
return cap_raised(cred->cap_effective, cap) ? 0 : -EPERM;
security/commoncap.c
831
const struct cred *old = current_cred();
security/commoncap.c
832
struct cred *new = bprm->cred;
security/commoncap.c
864
#define __cap_grew(target, source, cred) \
security/commoncap.c
865
!cap_issubset(cred->cap_##target, cred->cap_##source)
security/commoncap.c
866
#define __cap_full(field, cred) \
security/commoncap.c
867
cap_issubset(CAP_FULL_SET, cred->cap_##field)
security/commoncap.c
886
static inline bool nonroot_raised_pE(struct cred *new, const struct cred *old,
security/commoncap.c
922
const struct cred *old = current_cred();
security/commoncap.c
923
struct cred *new = bprm->cred;
security/commoncap.c
95
if ((ns->parent == cred_ns) && uid_eq(ns->owner, cred->euid))
security/integrity/digsig.c
102
const struct cred *cred = current_cred();
security/integrity/digsig.c
106
KGIDT_INIT(0), cred, perm,
security/integrity/ima/ima.h
383
const struct cred *cred, struct lsm_prop *prop, int mask,
security/integrity/ima/ima.h
414
const struct cred *cred, struct lsm_prop *prop,
security/integrity/ima/ima_api.c
192
const struct cred *cred, struct lsm_prop *prop, int mask,
security/integrity/ima/ima_api.c
201
return ima_match_policy(idmap, inode, cred, prop, func, mask,
security/integrity/ima/ima_main.c
236
static int process_measurement(struct file *file, const struct cred *cred,
security/integrity/ima/ima_main.c
265
action = ima_get_action(file_mnt_idmap(file), inode, cred, prop,
security/integrity/ima/ima_main.c
620
return process_measurement((struct file *)file, bprm->cred, &prop, NULL,
security/integrity/ima/ima_policy.c
521
const struct cred *cred)
security/integrity/ima/ima_policy.c
527
if ((rule->flags & IMA_UID) && !rule->uid_op(cred->uid, rule->uid))
security/integrity/ima/ima_policy.c
575
struct inode *inode, const struct cred *cred,
security/integrity/ima/ima_policy.c
592
ima_match_rule_data(rule, func_data, cred));
security/integrity/ima/ima_policy.c
618
if ((rule->flags & IMA_UID) && !rule->uid_op(cred->uid, rule->uid))
security/integrity/ima/ima_policy.c
622
if (!rule->uid_op(cred->euid, rule->uid)
security/integrity/ima/ima_policy.c
623
&& !rule->uid_op(cred->suid, rule->uid)
security/integrity/ima/ima_policy.c
624
&& !rule->uid_op(cred->uid, rule->uid))
security/integrity/ima/ima_policy.c
626
} else if (!rule->uid_op(cred->euid, rule->uid))
security/integrity/ima/ima_policy.c
629
if ((rule->flags & IMA_GID) && !rule->gid_op(cred->gid, rule->gid))
security/integrity/ima/ima_policy.c
633
if (!rule->gid_op(cred->egid, rule->gid)
security/integrity/ima/ima_policy.c
634
&& !rule->gid_op(cred->sgid, rule->gid)
security/integrity/ima/ima_policy.c
635
&& !rule->gid_op(cred->gid, rule->gid))
security/integrity/ima/ima_policy.c
637
} else if (!rule->gid_op(cred->egid, rule->gid))
security/integrity/ima/ima_policy.c
753
const struct cred *cred, struct lsm_prop *prop,
security/integrity/ima/ima_policy.c
772
if (!ima_match_rules(entry, idmap, inode, cred, prop,
security/keys/internal.h
114
const struct cred *cred;
security/keys/internal.h
145
extern struct key *get_user_session_keyring_rcu(const struct cred *);
security/keys/internal.h
146
extern int install_thread_keyring_to_cred(struct cred *);
security/keys/internal.h
147
extern int install_process_keyring_to_cred(struct cred *);
security/keys/internal.h
148
extern int install_session_keyring_to_cred(struct cred *, struct key *);
security/keys/internal.h
176
const struct cred *cred,
security/keys/key.c
225
kuid_t uid, kgid_t gid, const struct cred *cred,
security/keys/key.c
316
ret = security_key_alloc(key, cred, flags);
security/keys/key.c
820
const struct cred *cred = current_cred();
security/keys/key.c
934
cred->fsuid, cred->fsgid, cred, perm, flags, NULL);
security/keys/keyctl.c
1152
struct cred *new;
security/keys/keyctl.c
1177
const struct cred *cred = current_cred();
security/keys/keyctl.c
1196
instkey = cred->request_key_auth;
security/keys/keyctl.c
1338
const struct cred *cred = current_cred();
security/keys/keyctl.c
1357
instkey = cred->request_key_auth;
security/keys/keyctl.c
1395
struct cred *new;
security/keys/keyctl.c
1629
const struct cred *mycred, *pcred;
security/keys/keyctl.c
1632
struct cred *cred;
security/keys/keyctl.c
1644
cred = cred_alloc_blank();
security/keys/keyctl.c
1645
if (!cred)
security/keys/keyctl.c
1647
newwork = &cred->rcu;
security/keys/keyctl.c
1649
cred->session_keyring = key_ref_to_ptr(keyring_r);
security/keys/keyctl.c
1708
put_cred(container_of(oldwork, struct cred, rcu));
security/keys/keyctl.c
1710
put_cred(cred);
security/keys/keyring.c
518
const struct cred *cred, key_perm_t perm,
security/keys/keyring.c
527
uid, gid, cred, perm, flags, restrict_link);
security/keys/keyring.c
617
ctx->cred, KEY_NEED_SEARCH) < 0) {
security/keys/keyring.c
797
ctx->cred, KEY_NEED_SEARCH) < 0)
security/keys/keyring.c
919
err = key_task_permission(keyring_ref, ctx->cred, KEY_NEED_SEARCH);
security/keys/keyring.c
949
.cred = current_cred(),
security/keys/permission.c
26
int key_task_permission(const key_ref_t key_ref, const struct cred *cred,
security/keys/permission.c
54
if (uid_eq(key->uid, cred->fsuid)) {
security/keys/permission.c
62
if (gid_eq(key->gid, cred->fsgid)) {
security/keys/permission.c
67
ret = groups_search(cred->group_info, key->gid);
security/keys/permission.c
90
return security_key_permission(key_ref, cred, need_perm);
security/keys/proc.c
167
.cred = m->file->f_cred,
security/keys/proc.c
191
rc = key_task_permission(key_ref, ctx.cred, KEY_NEED_VIEW);
security/keys/process_keys.c
106
uid_keyring = keyring_alloc(buf, cred->user->uid, INVALID_GID,
security/keys/process_keys.c
107
cred, user_keyring_perm,
security/keys/process_keys.c
128
session_keyring = keyring_alloc(buf, cred->user->uid, INVALID_GID,
security/keys/process_keys.c
129
cred, user_keyring_perm,
security/keys/process_keys.c
185
struct key *get_user_session_keyring_rcu(const struct cred *cred)
security/keys/process_keys.c
187
struct key *reg_keyring = READ_ONCE(cred->user_ns->user_keyring_register);
security/keys/process_keys.c
194
.cred = cred,
security/keys/process_keys.c
205
from_kuid(cred->user_ns,
security/keys/process_keys.c
206
cred->user->uid));
security/keys/process_keys.c
221
int install_thread_keyring_to_cred(struct cred *new)
security/keys/process_keys.c
246
struct cred *new;
security/keys/process_keys.c
268
int install_process_keyring_to_cred(struct cred *new)
security/keys/process_keys.c
293
struct cred *new;
security/keys/process_keys.c
317
int install_session_keyring_to_cred(struct cred *cred, struct key *keyring)
security/keys/process_keys.c
327
if (cred->session_keyring)
security/keys/process_keys.c
330
keyring = keyring_alloc("_ses", cred->uid, cred->gid, cred,
security/keys/process_keys.c
340
old = cred->session_keyring;
security/keys/process_keys.c
341
cred->session_keyring = keyring;
security/keys/process_keys.c
358
struct cred *new;
security/keys/process_keys.c
377
void key_fsuid_changed(struct cred *new_cred)
security/keys/process_keys.c
390
void key_fsgid_changed(struct cred *new_cred)
security/keys/process_keys.c
426
const struct cred *cred = ctx->cred;
security/keys/process_keys.c
440
if (cred->thread_keyring) {
security/keys/process_keys.c
442
make_key_ref(cred->thread_keyring, 1), ctx);
security/keys/process_keys.c
458
if (cred->process_keyring) {
security/keys/process_keys.c
460
make_key_ref(cred->process_keyring, 1), ctx);
security/keys/process_keys.c
479
if (cred->session_keyring) {
security/keys/process_keys.c
481
make_key_ref(cred->session_keyring, 1), ctx);
security/keys/process_keys.c
500
else if ((user_session = get_user_session_keyring_rcu(cred))) {
security/keys/process_keys.c
553
if (ctx->cred->request_key_auth &&
security/keys/process_keys.c
554
ctx->cred == current_cred() &&
security/keys/process_keys.c
557
const struct cred *cred = ctx->cred;
security/keys/process_keys.c
559
if (key_validate(cred->request_key_auth) == 0) {
security/keys/process_keys.c
560
rka = ctx->cred->request_key_auth->payload.data[0];
security/keys/process_keys.c
563
ctx->cred = rka->cred;
security/keys/process_keys.c
565
ctx->cred = cred;
security/keys/process_keys.c
626
ctx.cred = get_current_cred();
security/keys/process_keys.c
631
if (!ctx.cred->thread_keyring) {
security/keys/process_keys.c
643
key = ctx.cred->thread_keyring;
security/keys/process_keys.c
649
if (!ctx.cred->process_keyring) {
security/keys/process_keys.c
661
key = ctx.cred->process_keyring;
security/keys/process_keys.c
667
if (!ctx.cred->session_keyring) {
security/keys/process_keys.c
683
&ctx.cred->session_keyring->flags) &&
security/keys/process_keys.c
691
key = ctx.cred->session_keyring;
security/keys/process_keys.c
716
key = ctx.cred->request_key_auth;
security/keys/process_keys.c
725
if (!ctx.cred->request_key_auth)
security/keys/process_keys.c
728
down_read(&ctx.cred->request_key_auth->sem);
security/keys/process_keys.c
730
&ctx.cred->request_key_auth->flags)) {
security/keys/process_keys.c
734
rka = ctx.cred->request_key_auth->payload.data[0];
security/keys/process_keys.c
738
up_read(&ctx.cred->request_key_auth->sem);
security/keys/process_keys.c
77
const struct cred *cred = current_cred();
security/keys/process_keys.c
803
ret = key_task_permission(key_ref, ctx.cred, need_perm);
security/keys/process_keys.c
810
put_cred(ctx.cred);
security/keys/process_keys.c
82
uid_t uid = from_kuid(user_ns, cred->user->uid);
security/keys/process_keys.c
821
put_cred(ctx.cred);
security/keys/process_keys.c
839
const struct cred *old;
security/keys/process_keys.c
840
struct cred *new;
security/keys/process_keys.c
913
const struct cred *old = current_cred();
security/keys/process_keys.c
914
struct cred *new = container_of(twork, struct cred, rcu);
security/keys/request_key.c
122
const struct cred *cred = current_cred();
security/keys/request_key.c
139
cred = get_current_cred();
security/keys/request_key.c
140
keyring = keyring_alloc(desc, cred->fsuid, cred->fsgid, cred,
security/keys/request_key.c
143
put_cred(cred);
security/keys/request_key.c
155
sprintf(uid_str, "%d", from_kuid(&init_user_ns, cred->fsuid));
security/keys/request_key.c
156
sprintf(gid_str, "%d", from_kgid(&init_user_ns, cred->fsgid));
security/keys/request_key.c
163
cred->thread_keyring ? cred->thread_keyring->serial : 0);
security/keys/request_key.c
166
if (cred->process_keyring)
security/keys/request_key.c
167
prkey = cred->process_keyring->serial;
security/keys/request_key.c
170
session = cred->session_keyring;
security/keys/request_key.c
268
const struct cred *cred = current_cred();
security/keys/request_key.c
283
switch (cred->jit_keyring) {
security/keys/request_key.c
286
if (cred->request_key_auth) {
security/keys/request_key.c
287
authkey = cred->request_key_auth;
security/keys/request_key.c
303
dest_keyring = key_get(cred->thread_keyring);
security/keys/request_key.c
309
dest_keyring = key_get(cred->process_keyring);
security/keys/request_key.c
315
dest_keyring = key_get(cred->session_keyring);
security/keys/request_key.c
396
ctx->cred->fsuid, ctx->cred->fsgid, ctx->cred,
security/keys/request_key.c
588
.cred = current_cred(),
security/keys/request_key.c
791
.cred = current_cred(),
security/keys/request_key.c
80
static int umh_keys_init(struct subprocess_info *info, struct cred *cred)
security/keys/request_key.c
84
return install_session_keyring_to_cred(cred, keyring);
security/keys/request_key_auth.c
112
if (rka->cred)
security/keys/request_key_auth.c
113
put_cred(rka->cred);
security/keys/request_key_auth.c
166
const struct cred *cred = current_cred();
security/keys/request_key_auth.c
185
if (cred->request_key_auth) {
security/keys/request_key_auth.c
187
down_read(&cred->request_key_auth->sem);
security/keys/request_key_auth.c
192
&cred->request_key_auth->flags)) {
security/keys/request_key_auth.c
193
up_read(&cred->request_key_auth->sem);
security/keys/request_key_auth.c
198
irka = cred->request_key_auth->payload.data[0];
security/keys/request_key_auth.c
199
rka->cred = get_cred(irka->cred);
security/keys/request_key_auth.c
202
up_read(&cred->request_key_auth->sem);
security/keys/request_key_auth.c
206
rka->cred = get_cred(cred);
security/keys/request_key_auth.c
217
cred->fsuid, cred->fsgid, cred,
security/keys/request_key_auth.c
252
.cred = current_cred(),
security/landlock/cred.c
19
static void hook_cred_transfer(struct cred *const new,
security/landlock/cred.c
20
const struct cred *const old)
security/landlock/cred.c
31
static int hook_cred_prepare(struct cred *const new,
security/landlock/cred.c
32
const struct cred *const old, const gfp_t gfp)
security/landlock/cred.c
38
static void hook_cred_free(struct cred *const cred)
security/landlock/cred.c
40
struct landlock_ruleset *const dom = landlock_cred(cred)->domain;
security/landlock/cred.c
51
landlock_cred(bprm->cred)->domain_exec = 0;
security/landlock/cred.h
122
landlock_get_applicable_subject(const struct cred *const cred,
security/landlock/cred.h
132
if (!cred)
security/landlock/cred.h
135
domain = landlock_cred(cred)->domain;
security/landlock/cred.h
149
return landlock_cred(cred);
security/landlock/cred.h
65
landlock_cred(const struct cred *cred)
security/landlock/cred.h
67
return cred->security + landlock_blob_sizes.lbs_cred;
security/landlock/syscalls.c
486
struct cred *new_cred;
security/landlock/task.c
340
const struct cred *cred)
security/landlock/task.c
346
if (!cred) {
security/landlock/task.c
359
cred = current_cred();
security/landlock/task.c
362
subject = landlock_get_applicable_subject(cred, signal_scope,
security/landlock/tsync.c
100
if (!cred) {
security/landlock/tsync.c
113
landlock_cred_copy(landlock_cred(cred),
security/landlock/tsync.c
133
abort_creds(cred);
security/landlock/tsync.c
145
commit_creds(cred);
security/landlock/tsync.c
30
const struct cred *old_cred;
security/landlock/tsync.c
31
const struct cred *new_cred;
security/landlock/tsync.c
470
int landlock_restrict_sibling_threads(const struct cred *old_cred,
security/landlock/tsync.c
471
const struct cred *new_cred)
security/landlock/tsync.c
82
struct cred *cred = NULL;
security/landlock/tsync.c
95
cred = (struct cred *)get_cred(ctx->new_cred);
security/landlock/tsync.c
98
cred = prepare_creds();
security/landlock/tsync.h
13
int landlock_restrict_sibling_threads(const struct cred *old_cred,
security/landlock/tsync.h
14
const struct cred *new_cred);
security/lsm.h
35
int lsm_cred_alloc(struct cred *cred, gfp_t gfp);
security/lsm_init.c
470
if (lsm_cred_alloc((struct cred *)unrcu_pointer(current->cred),
security/safesetid/lsm.c
114
if (setid_policy_lookup((kid_t){.uid = cred->uid}, INVALID_ID, UID) == SIDPOL_DEFAULT)
security/safesetid/lsm.c
121
__kuid_val(cred->uid));
security/safesetid/lsm.c
128
if (setid_policy_lookup((kid_t){.gid = cred->gid}, INVALID_ID, GID) == SIDPOL_DEFAULT)
security/safesetid/lsm.c
135
__kgid_val(cred->gid));
security/safesetid/lsm.c
148
static bool id_permitted_for_cred(const struct cred *old, kid_t new_id, enum setid_type new_type)
security/safesetid/lsm.c
191
static int safesetid_task_fix_setuid(struct cred *new,
security/safesetid/lsm.c
192
const struct cred *old,
security/safesetid/lsm.c
215
static int safesetid_task_fix_setgid(struct cred *new,
security/safesetid/lsm.c
216
const struct cred *old,
security/safesetid/lsm.c
239
static int safesetid_task_fix_setgroups(struct cred *new, const struct cred *old)
security/safesetid/lsm.c
91
static int safesetid_security_capable(const struct cred *cred,
security/security.c
1272
const struct cred *old, struct cred *new)
security/security.c
208
int lsm_cred_alloc(struct cred *cred, gfp_t gfp)
security/security.c
210
return lsm_blob_alloc(&cred->security, blob_sizes.lbs_cred, gfp);
security/security.c
2279
int security_inode_copy_up(struct dentry *src, struct cred **new)
security/security.c
2718
int security_cred_alloc_blank(struct cred *cred, gfp_t gfp)
security/security.c
2720
int rc = lsm_cred_alloc(cred, gfp);
security/security.c
2725
rc = call_int_hook(cred_alloc_blank, cred, gfp);
security/security.c
2727
security_cred_free(cred);
security/security.c
2737
void security_cred_free(struct cred *cred)
security/security.c
2743
if (unlikely(cred->security == NULL))
security/security.c
2746
call_void_hook(cred_free, cred);
security/security.c
2748
kfree(cred->security);
security/security.c
2749
cred->security = NULL;
security/security.c
2762
int security_prepare_creds(struct cred *new, const struct cred *old, gfp_t gfp)
security/security.c
2782
void security_transfer_creds(struct cred *new, const struct cred *old)
security/security.c
2795
void security_cred_getsecid(const struct cred *c, u32 *secid)
security/security.c
2810
void security_cred_getlsmprop(const struct cred *c, struct lsm_prop *prop)
security/security.c
2827
int security_kernel_act_as(struct cred *new, u32 secid)
security/security.c
2843
int security_kernel_create_files_as(struct cred *new, struct inode *inode)
security/security.c
2950
int security_task_fix_setuid(struct cred *new, const struct cred *old,
security/security.c
2970
int security_task_fix_setgid(struct cred *new, const struct cred *old,
security/security.c
2988
int security_task_fix_setgroups(struct cred *new, const struct cred *old)
security/security.c
3116
int security_task_prlimit(const struct cred *cred, const struct cred *tcred,
security/security.c
3119
return call_int_hook(task_prlimit, cred, tcred, flags);
security/security.c
3196
int sig, const struct cred *cred)
security/security.c
3198
return call_int_hook(task_kill, p, info, sig, cred);
security/security.c
3254
int security_create_user_ns(const struct cred *cred)
security/security.c
3256
return call_int_hook(userns_create, cred);
security/security.c
3980
int security_post_notification(const struct cred *w_cred,
security/security.c
3981
const struct cred *cred,
security/security.c
3984
return call_int_hook(post_notification, w_cred, cred, n);
security/security.c
488
int security_binder_set_context_mgr(const struct cred *mgr)
security/security.c
5015
int security_key_alloc(struct key *key, const struct cred *cred,
security/security.c
502
int security_binder_transaction(const struct cred *from,
security/security.c
5022
rc = call_int_hook(key_alloc, key, cred, flags);
security/security.c
503
const struct cred *to)
security/security.c
5050
int security_key_permission(key_ref_t key_ref, const struct cred *cred,
security/security.c
5053
return call_int_hook(key_permission, key_ref, cred, need_perm);
security/security.c
517
int security_binder_transfer_binder(const struct cred *from,
security/security.c
518
const struct cred *to)
security/security.c
533
int security_binder_transfer_file(const struct cred *from,
security/security.c
534
const struct cred *to, const struct file *file)
security/security.c
5544
int security_uring_override_creds(const struct cred *new)
security/security.c
608
int security_capset(struct cred *new, const struct cred *old,
security/security.c
630
int security_capable(const struct cred *cred,
security/security.c
635
return call_int_hook(capable, cred, ns, cap, opts);
security/selinux/hooks.c
1640
static int cred_has_capability(const struct cred *cred,
security/selinux/hooks.c
1646
u32 sid = cred_sid(cred);
security/selinux/hooks.c
1677
static int inode_has_perm(const struct cred *cred,
security/selinux/hooks.c
1688
sid = cred_sid(cred);
security/selinux/hooks.c
1697
static inline int dentry_has_perm(const struct cred *cred,
security/selinux/hooks.c
1710
return inode_has_perm(cred, inode, av, &ad);
security/selinux/hooks.c
1716
static inline int path_has_perm(const struct cred *cred,
security/selinux/hooks.c
1729
return inode_has_perm(cred, inode, av, &ad);
security/selinux/hooks.c
1733
static inline int file_path_has_perm(const struct cred *cred,
security/selinux/hooks.c
1741
return inode_has_perm(cred, file_inode(file), av, &ad);
security/selinux/hooks.c
1756
static int file_has_perm(const struct cred *cred,
security/selinux/hooks.c
1763
u32 sid = cred_sid(cred);
security/selinux/hooks.c
1779
rc = bpf_fd_pass(file, cred_sid(cred));
security/selinux/hooks.c
1787
rc = inode_has_perm(cred, inode, av, &ad);
security/selinux/hooks.c
1965
static int superblock_has_perm(const struct cred *cred,
security/selinux/hooks.c
1971
u32 sid = cred_sid(cred);
security/selinux/hooks.c
2046
static int selinux_binder_set_context_mgr(const struct cred *mgr)
security/selinux/hooks.c
2052
static int selinux_binder_transaction(const struct cred *from,
security/selinux/hooks.c
2053
const struct cred *to)
security/selinux/hooks.c
2071
static int selinux_binder_transfer_binder(const struct cred *from,
security/selinux/hooks.c
2072
const struct cred *to)
security/selinux/hooks.c
2079
static int selinux_binder_transfer_file(const struct cred *from,
security/selinux/hooks.c
2080
const struct cred *to,
security/selinux/hooks.c
2143
static int selinux_capset(struct cred *new, const struct cred *old,
security/selinux/hooks.c
2162
static int selinux_capable(const struct cred *cred, struct user_namespace *ns,
security/selinux/hooks.c
2165
return cred_has_capability(cred, cap, opts, ns == &init_user_ns);
security/selinux/hooks.c
2170
const struct cred *cred = current_cred();
security/selinux/hooks.c
2185
rc = superblock_has_perm(cred, sb, FILESYSTEM__QUOTAMOD, NULL);
security/selinux/hooks.c
2194
rc = superblock_has_perm(cred, sb, FILESYSTEM__QUOTAGET, NULL);
security/selinux/hooks.c
2205
const struct cred *cred = current_cred();
security/selinux/hooks.c
2207
return dentry_has_perm(cred, dentry, FILE__QUOTAON);
security/selinux/hooks.c
226
static inline u32 cred_sid(const struct cred *cred)
security/selinux/hooks.c
230
crsec = selinux_cred(cred);
security/selinux/hooks.c
2325
new_crsec = selinux_cred(bprm->cred);
security/selinux/hooks.c
2443
static inline void flush_unauthorized_files(const struct cred *cred,
security/selinux/hooks.c
2465
if (file_path_has_perm(cred, file, FILE__READ | FILE__WRITE))
security/selinux/hooks.c
2476
n = iterate_fd(files, 0, match_file, cred);
security/selinux/hooks.c
2480
devnull = dentry_open(&selinux_null, O_RDWR, cred);
security/selinux/hooks.c
2486
} while ((n = iterate_fd(files, n, match_file, cred)) != 0);
security/selinux/hooks.c
2500
new_crsec = selinux_cred(bprm->cred);
security/selinux/hooks.c
2505
flush_unauthorized_files(bprm->cred, current->files);
security/selinux/hooks.c
2763
const struct cred *cred = current_cred();
security/selinux/hooks.c
2768
return superblock_has_perm(cred, sb, FILESYSTEM__MOUNT, &ad);
security/selinux/hooks.c
2773
const struct cred *cred = current_cred();
security/selinux/hooks.c
2778
return superblock_has_perm(cred, dentry->d_sb, FILESYSTEM__GETATTR, &ad);
security/selinux/hooks.c
2787
const struct cred *cred = current_cred();
security/selinux/hooks.c
2790
return superblock_has_perm(cred, path->dentry->d_sb,
security/selinux/hooks.c
2793
return path_has_perm(cred, path, FILE__MOUNTON);
security/selinux/hooks.c
2799
const struct cred *cred = current_cred();
security/selinux/hooks.c
2801
return path_has_perm(cred, to_path, FILE__MOUNTON);
security/selinux/hooks.c
2806
const struct cred *cred = current_cred();
security/selinux/hooks.c
2808
return superblock_has_perm(cred, mnt->mnt_sb,
security/selinux/hooks.c
2920
const struct cred *old,
security/selinux/hooks.c
2921
struct cred *new)
security/selinux/hooks.c
3093
const struct cred *cred = current_cred();
security/selinux/hooks.c
3095
return dentry_has_perm(cred, dentry, FILE__READ);
security/selinux/hooks.c
3281
const struct cred *cred = current_cred();
security/selinux/hooks.c
3296
return dentry_has_perm(cred, dentry, FILE__SETATTR);
security/selinux/hooks.c
3304
return dentry_has_perm(cred, dentry, av);
security/selinux/hooks.c
3321
const struct cred *cred = current_cred();
security/selinux/hooks.c
3324
if (cap_capable(cred, &init_user_ns, CAP_MAC_ADMIN, opts))
security/selinux/hooks.c
3326
if (cred_has_capability(cred, CAP_MAC_ADMIN, opts, true))
security/selinux/hooks.c
3495
const struct cred *cred = current_cred();
security/selinux/hooks.c
3497
return dentry_has_perm(cred, dentry, FILE__GETATTR);
security/selinux/hooks.c
3502
const struct cred *cred = current_cred();
security/selinux/hooks.c
3504
return dentry_has_perm(cred, dentry, FILE__GETATTR);
security/selinux/hooks.c
3682
static int selinux_inode_copy_up(struct dentry *src, struct cred **new)
security/selinux/hooks.c
3686
struct cred *new_creds = *new;
security/selinux/hooks.c
3786
const struct cred *cred = current_cred();
security/selinux/hooks.c
3793
return file_has_perm(cred, file,
security/selinux/hooks.c
3832
static int ioctl_has_perm(const struct cred *cred, struct file *file,
security/selinux/hooks.c
3840
u32 ssid = cred_sid(cred);
security/selinux/hooks.c
3872
const struct cred *cred = current_cred();
security/selinux/hooks.c
3881
error = file_has_perm(cred, file, FILE__GETATTR);
security/selinux/hooks.c
3886
error = file_has_perm(cred, file, FILE__SETATTR);
security/selinux/hooks.c
3892
error = file_has_perm(cred, file, 0);
security/selinux/hooks.c
3897
error = cred_has_capability(cred, CAP_SYS_TTY_CONFIG,
security/selinux/hooks.c
3904
error = ioctl_has_perm(cred, file, FILE__IOCTL, (u16) cmd);
security/selinux/hooks.c
3911
error = ioctl_has_perm(cred, file, FILE__IOCTL, (u16) cmd);
security/selinux/hooks.c
3947
const struct cred *cred = current_cred();
security/selinux/hooks.c
3948
u32 sid = cred_sid(cred);
security/selinux/hooks.c
3976
return file_has_perm(cred, file, av);
security/selinux/hooks.c
4020
const struct cred *cred = current_cred();
security/selinux/hooks.c
4021
u32 sid = cred_sid(cred);
security/selinux/hooks.c
4051
rc = file_has_perm(cred, vma->vm_file, FILE__EXECMOD);
security/selinux/hooks.c
4062
const struct cred *cred = current_cred();
security/selinux/hooks.c
4064
return file_has_perm(cred, file, FILE__LOCK);
security/selinux/hooks.c
4070
const struct cred *cred = current_cred();
security/selinux/hooks.c
4076
err = file_has_perm(cred, file, FILE__WRITE);
security/selinux/hooks.c
4087
err = file_has_perm(cred, file, 0);
security/selinux/hooks.c
4100
err = file_has_perm(cred, file, FILE__LOCK);
security/selinux/hooks.c
4139
const struct cred *cred = current_cred();
security/selinux/hooks.c
4141
return file_has_perm(cred, file, file_to_av(file));
security/selinux/hooks.c
4187
static int selinux_cred_prepare(struct cred *new, const struct cred *old,
security/selinux/hooks.c
4200
static void selinux_cred_transfer(struct cred *new, const struct cred *old)
security/selinux/hooks.c
4208
static void selinux_cred_getsecid(const struct cred *c, u32 *secid)
security/selinux/hooks.c
4213
static void selinux_cred_getlsmprop(const struct cred *c, struct lsm_prop *prop)
security/selinux/hooks.c
4222
static int selinux_kernel_act_as(struct cred *new, u32 secid)
security/selinux/hooks.c
4245
static int selinux_kernel_create_files_as(struct cred *new, struct inode *inode)
security/selinux/hooks.c
440
const struct cred *cred)
security/selinux/hooks.c
442
const struct cred_security_struct *crsec = selinux_cred(cred);
security/selinux/hooks.c
4421
static int selinux_task_prlimit(const struct cred *cred, const struct cred *tcred,
security/selinux/hooks.c
4432
return avc_has_perm(cred_sid(cred), cred_sid(tcred),
security/selinux/hooks.c
4471
int sig, const struct cred *cred)
security/selinux/hooks.c
4480
if (!cred)
security/selinux/hooks.c
4483
secid = cred_sid(cred);
security/selinux/hooks.c
4500
static int selinux_userns_create(const struct cred *cred)
security/selinux/hooks.c
457
const struct cred *cred)
security/selinux/hooks.c
459
const struct cred_security_struct *crsec = selinux_cred(cred);
security/selinux/hooks.c
644
const struct cred *cred = current_cred();
security/selinux/hooks.c
6612
struct cred *new;
security/selinux/hooks.c
6903
static int selinux_key_alloc(struct key *k, const struct cred *cred,
security/selinux/hooks.c
6909
crsec = selinux_cred(cred);
security/selinux/hooks.c
6919
const struct cred *cred,
security/selinux/hooks.c
6956
sid = cred_sid(cred);
security/selinux/hooks.c
7331
static int selinux_uring_override_creds(const struct cred *new)
security/selinux/hooks.c
802
rc = may_context_mount_sb_relabel(fscontext_sid, sbsec, cred);
security/selinux/hooks.c
832
cred);
security/selinux/hooks.c
838
cred);
security/selinux/hooks.c
851
cred);
security/selinux/hooks.c
870
sbsec, cred);
security/selinux/include/objsec.h
182
static inline struct cred_security_struct *selinux_cred(const struct cred *cred)
security/selinux/include/objsec.h
184
return cred->security + selinux_blob_sizes.lbs_cred;
security/smack/smack.h
312
bool smack_privileged_cred(int cap, const struct cred *cred);
security/smack/smack.h
350
static inline struct task_smack *smack_cred(const struct cred *cred)
security/smack/smack.h
352
return cred->security + smack_blob_sizes.lbs_cred;
security/smack/smack.h
424
const struct cred *cred;
security/smack/smack.h
428
cred = __task_cred(t);
security/smack/smack.h
429
skp = smk_of_task(smack_cred(cred));
security/smack/smack_access.c
710
bool smack_privileged_cred(int cap, const struct cred *cred)
security/smack/smack_access.c
712
struct task_smack *tsp = smack_cred(cred);
security/smack/smack_access.c
717
rc = cap_capable(cred, &init_user_ns, cap, CAP_OPT_NONE);
security/smack/smack_lsm.c
1972
struct smack_known *tkp = smk_of_task(smack_cred(tsk->cred));
security/smack/smack_lsm.c
1973
const struct cred *tcred;
security/smack/smack_lsm.c
2093
static int smack_cred_alloc_blank(struct cred *cred, gfp_t gfp)
security/smack/smack_lsm.c
2095
init_task_smack(smack_cred(cred), NULL, NULL);
security/smack/smack_lsm.c
2105
static void smack_cred_free(struct cred *cred)
security/smack/smack_lsm.c
2107
struct task_smack *tsp = smack_cred(cred);
security/smack/smack_lsm.c
2129
static int smack_cred_prepare(struct cred *new, const struct cred *old,
security/smack/smack_lsm.c
2154
static void smack_cred_transfer(struct cred *new, const struct cred *old)
security/smack/smack_lsm.c
2169
static void smack_cred_getsecid(const struct cred *cred, u32 *secid)
security/smack/smack_lsm.c
2174
skp = smk_of_task(smack_cred(cred));
security/smack/smack_lsm.c
2186
static void smack_cred_getlsmprop(const struct cred *cred,
security/smack/smack_lsm.c
2190
prop->smack.skp = smk_of_task(smack_cred(cred));
security/smack/smack_lsm.c
2201
static int smack_kernel_act_as(struct cred *new, u32 secid)
security/smack/smack_lsm.c
2217
static int smack_kernel_create_files_as(struct cred *new,
security/smack/smack_lsm.c
237
static int smk_bu_credfile(const struct cred *cred, struct file *file,
security/smack/smack_lsm.c
2387
int sig, const struct cred *cred)
security/smack/smack_lsm.c
240
struct task_smack *tsp = smack_cred(cred);
security/smack/smack_lsm.c
2403
if (cred == NULL) {
security/smack/smack_lsm.c
2413
skp = smk_of_task(smack_cred(cred));
security/smack/smack_lsm.c
263
#define smk_bu_credfile(cred, file, mode, RC) (RC)
security/smack/smack_lsm.c
3779
struct cred *new;
security/smack/smack_lsm.c
420
const struct cred *tracercred;
security/smack/smack_lsm.c
4568
static int smack_key_alloc(struct key *key, const struct cred *cred,
security/smack/smack_lsm.c
4572
struct smack_known *skp = smk_of_task(smack_cred(cred));
security/smack/smack_lsm.c
4588
const struct cred *cred,
security/smack/smack_lsm.c
4595
struct smack_known *tkp = smk_of_task(smack_cred(cred));
security/smack/smack_lsm.c
4727
static int smack_post_notification(const struct cred *w_cred,
security/smack/smack_lsm.c
4728
const struct cred *cred,
security/smack/smack_lsm.c
4739
if (!cred)
security/smack/smack_lsm.c
4741
subj = smk_of_task(smack_cred(cred));
security/smack/smack_lsm.c
4971
static int smack_inode_copy_up(struct dentry *dentry, struct cred **new)
security/smack/smack_lsm.c
4977
struct cred *new_creds = *new;
security/smack/smack_lsm.c
5010
const struct cred *old,
security/smack/smack_lsm.c
5011
struct cred *new)
security/smack/smack_lsm.c
5050
static int smack_uring_override_creds(const struct cred *new)
security/smack/smack_lsm.c
5328
struct cred *cred = (struct cred *) current->cred;
security/smack/smack_lsm.c
5338
tsp = smack_cred(cred);
security/smack/smack_lsm.c
904
struct task_smack *bsp = smack_cred(bprm->cred);
security/smack/smackfs.c
2781
struct cred *new;
security/tomoyo/common.c
951
(!uid_eq(task->cred->uid, GLOBAL_ROOT_UID) ||
security/tomoyo/common.c
952
!uid_eq(task->cred->euid, GLOBAL_ROOT_UID)))
security/tomoyo/tomoyo.c
37
static int tomoyo_cred_prepare(struct cred *new, const struct cred *old,
tools/perf/trace/beauty/include/linux/socket.h
15
struct cred;
tools/testing/selftests/bpf/progs/test_deny_namespace.c
17
int BPF_PROG(test_userns_create, const struct cred *cred, int ret)
tools/testing/selftests/bpf/progs/test_deny_namespace.c
19
kernel_cap_t caps = cred->cap_effective;