Created
March 23, 2021 02:00
-
-
Save jarkkojs/7b417be20cb52ed971a90561192f0883 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 0x01 view | |
# Ox02 read | |
# 0x04 write | |
# 0x08 search | |
# 0x10 link | |
# 0x20 setattr | |
# | |
# A key default permissions: 0x3f010000 | |
# A keyring default permissions: 0x3f3f0000 | |
# TEST: Remove R from possessor. | |
KEYID=$(keyctl add user test test @u) | |
keyctl setperm $KEYID 0x3d010000 | |
keyctl print $KEYID | |
keyctl unlink $KEYID | |
# TEST: Remove A and R from possessor. | |
KEYID=$(keyctl add user test test @u) | |
keyctl setperm $KEYID 0x1d010000 | |
keyctl print $KEYID | |
keyctl unlink $KEYID | |
# TEST: Remove A, W and R from possessor. | |
KEYID=$(keyctl add user test test @u) | |
keyctl setperm $KEYID 0x19010000 | |
keyctl print $KEYID | |
keyctl unlink $KEYID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment