[git commit] setpriv: accept any case in capability names

Denys Vlasenko vda.linux at googlemail.com
Fri Aug 18 17:11:57 UTC 2017


commit: https://git.busybox.net/busybox/commit/?id=79747415d6db1f85389247522304c941b4287f9b
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

This should work: setpriv --inh-caps -SyS_ReSOuRCE sh

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 util-linux/setpriv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util-linux/setpriv.c b/util-linux/setpriv.c
index 5c532d6..76fb62c 100644
--- a/util-linux/setpriv.c
+++ b/util-linux/setpriv.c
@@ -235,7 +235,7 @@ static void parse_cap(unsigned long *index, const char *cap)
 
 # if ENABLE_FEATURE_SETPRIV_CAPABILITY_NAMES
 	for (i = 0; i < ARRAY_SIZE(capabilities); i++) {
-		if (strcmp(capabilities[i], cap) != 0)
+		if (strcasecmp(capabilities[i], cap) != 0)
 			continue;
 
 		if (!cap_valid(i))


More information about the busybox-cvs mailing list