Lines Matching defs:context

394 	A(context, true),
489 /* Never allow relabeling on context mounts */
610 * aka someone passed context=a,context=b
779 /* sets the context of the superblock for the fs being mounted. */
791 * the superblock context if not already set.
1053 char *context = NULL;
1057 rc = security_sid_to_context(sid, &context, &len);
1059 bool has_comma = strchr(context, ',');
1064 seq_escape(m, context, "\"\n\\");
1068 kfree(context);
1350 char *context;
1355 context = kmalloc(len + 1, GFP_NOFS);
1356 if (!context)
1359 context[len] = '\0';
1360 rc = __vfs_getxattr(dentry, inode, XATTR_NAME_SELINUX, context, len);
1362 kfree(context);
1370 context = kmalloc(len + 1, GFP_NOFS);
1371 if (!context)
1374 context[len] = '\0';
1376 context, len);
1379 kfree(context);
1389 rc = security_context_to_sid_default(context, rc, sid,
1396 pr_notice_ratelimited("SELinux: inode=%lu on dev=%s was found to have an invalid context=%s. This indicates you may need to relabel the inode or the filesystem in question.\n",
1397 ino, dev, context);
1400 __func__, context, -rc, dev, ino);
1403 kfree(context);
2301 /* SELinux context only depends on initial program or script and not
2910 char *context;
2936 &context, &clen);
2939 xattr->value = context;
3218 * context contains a nul and we should audit that */
3307 pr_err("SELinux: unable to map context to SID"
3401 * Copy the inode security context value to the user.
3411 char *context = NULL;
3423 * If the caller has CAP_MAC_ADMIN, then get the raw context
3429 * in-core context value, not a denial.
3433 error = security_sid_to_context_force(isec->sid, &context,
3437 &context, &size);
3442 *buffer = context;
3445 kfree(context);
3521 /* The copy_up hook above sets the initial context on an inode, but we
3542 char *context;
3551 context = kmalloc(clen, GFP_KERNEL);
3552 if (!context)
3555 rc = kernfs_xattr_get(kn_dir, XATTR_NAME_SELINUX, context, clen);
3557 kfree(context);
3561 rc = security_context_to_sid(context, clen, &parent_sid,
3563 kfree(context);
3584 &context, &clen);
3588 rc = kernfs_xattr_set(kn, XATTR_NAME_SELINUX, context, clen,
3590 kfree(context);
3926 /* struct fown_struct is never outside the context of a struct file */
4037 * set the file creation context in a security record to the same as the
4038 * objective context of the specified inode
4199 upon context transitions. See selinux_bprm_committing_creds. */
5477 * and re-recreating a new label using the updated context
6396 /* Obtain a SID for the context, if one was specified. */
6410 * context contains a nul and we should audit that */
6437 /* Permission checking based on the specified context is
6439 open/mkdir/...), when we know the full context of the
6442 operation will then fail if the context is not permitted. */
6463 /* Only allow single threaded processes to change context */
6640 char *context = NULL;
6645 &context, &len);
6648 *_buffer = context;