Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 120711
b: refs/heads/master
c: 47d804b
h: refs/heads/master
i:
  120709: 500f5c4
  120707: 0e02ce1
  120703: ece08ef
v: v3
  • Loading branch information
David Howells authored and James Morris committed Nov 13, 2008
1 parent 13f1a0b commit 875644d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8192b0c482d7078fcdcb4854341b977426f6f09b
refs/heads/master: 47d804bfa1857b0edcac972c86499dcd14df3cf2
2 changes: 1 addition & 1 deletion trunk/security/keys/key.c
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ key_ref_t key_create_or_update(key_ref_t keyring_ref,
}

/* allocate a new key */
key = key_alloc(ktype, description, current->fsuid, current->fsgid,
key = key_alloc(ktype, description, current_fsuid(), current_fsgid(),
current, perm, flags);
if (IS_ERR(key)) {
key_ref = ERR_CAST(key);
Expand Down
2 changes: 1 addition & 1 deletion trunk/security/keys/keyctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ long keyctl_setperm_key(key_serial_t id, key_perm_t perm)
down_write(&key->sem);

/* if we're not the sysadmin, we can only change a key that we own */
if (capable(CAP_SYS_ADMIN) || key->uid == current->fsuid) {
if (capable(CAP_SYS_ADMIN) || key->uid == current_fsuid()) {
key->perm = perm;
ret = 0;
}
Expand Down
10 changes: 5 additions & 5 deletions trunk/security/keys/request_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static int call_sbin_request_key(struct key_construction *cons,
/* allocate a new session keyring */
sprintf(desc, "_req.%u", key->serial);

keyring = keyring_alloc(desc, current->fsuid, current->fsgid, current,
keyring = keyring_alloc(desc, current_fsuid(), current_fsgid(), current,
KEY_ALLOC_QUOTA_OVERRUN, NULL);
if (IS_ERR(keyring)) {
ret = PTR_ERR(keyring);
Expand All @@ -90,8 +90,8 @@ static int call_sbin_request_key(struct key_construction *cons,
goto error_link;

/* record the UID and GID */
sprintf(uid_str, "%d", current->fsuid);
sprintf(gid_str, "%d", current->fsgid);
sprintf(uid_str, "%d", current_fsuid());
sprintf(gid_str, "%d", current_fsgid());

/* we say which key is under construction */
sprintf(key_str, "%d", key->serial);
Expand Down Expand Up @@ -279,7 +279,7 @@ static int construct_alloc_key(struct key_type *type,
mutex_lock(&user->cons_lock);

key = key_alloc(type, description,
current->fsuid, current->fsgid, current, KEY_POS_ALL,
current_fsuid(), current_fsgid(), current, KEY_POS_ALL,
flags);
if (IS_ERR(key))
goto alloc_failed;
Expand Down Expand Up @@ -342,7 +342,7 @@ static struct key *construct_key_and_link(struct key_type *type,
struct key *key;
int ret;

user = key_user_lookup(current->fsuid);
user = key_user_lookup(current_fsuid());
if (!user)
return ERR_PTR(-ENOMEM);

Expand Down
2 changes: 1 addition & 1 deletion trunk/security/keys/request_key_auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ struct key *request_key_auth_new(struct key *target, const void *callout_info,
sprintf(desc, "%x", target->serial);

authkey = key_alloc(&key_type_request_key_auth, desc,
current->fsuid, current->fsgid, current,
current_fsuid(), current_fsgid(), current,
KEY_POS_VIEW | KEY_POS_READ | KEY_POS_SEARCH |
KEY_USR_VIEW, KEY_ALLOC_NOT_IN_QUOTA);
if (IS_ERR(authkey)) {
Expand Down

0 comments on commit 875644d

Please sign in to comment.