]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - security/keys/key.c
keys: Timestamp new keys
[mirror_ubuntu-bionic-kernel.git] / security / keys / key.c
index 249a6da4d27701be2ba416e8451a7edea0cbd5b4..749a5cf27a192efca427cfba758d49d89b199b0b 100644 (file)
@@ -297,6 +297,7 @@ struct key *key_alloc(struct key_type *type, const char *desc,
        key->gid = gid;
        key->perm = perm;
        key->restrict_link = restrict_link;
+       key->last_used_at = ktime_get_real_seconds();
 
        if (!(flags & KEY_ALLOC_NOT_IN_QUOTA))
                key->flags |= 1 << KEY_FLAG_IN_QUOTA;