From 2fa297f54c742260e96ee05b1ea6d1098b82d850 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Tue, 27 Jun 2023 20:06:18 -0400 Subject: helpers/mode: Fix permcopy shifts --- diff --git a/helpers/mode.c b/helpers/mode.c index fd66400..cec000b 100644 --- a/helpers/mode.c +++ b/helpers/mode.c @@ -135,17 +135,17 @@ _opkg_opk_helper_mode_parse_permcopy(struct _opkg_opk_helper_mode *mode) switch (*mode->sym_mode) { case 'u': perm = (mode->cur_mode & 0700) - | (mode->cur_mode & 0700) >> 001 - | (mode->cur_mode & 0700) >> 010; + | (mode->cur_mode & 0700) >> 3 + | (mode->cur_mode & 0700) >> 6; break; case 'g': - perm = (mode->cur_mode & 0070) << 001 + perm = (mode->cur_mode & 0070) << 3 | (mode->cur_mode & 0070) - | (mode->cur_mode & 0070) >> 001; + | (mode->cur_mode & 0070) >> 3; break; case 'o': - perm = (mode->cur_mode & 0007) << 010 - | (mode->cur_mode & 0007) << 001 + perm = (mode->cur_mode & 0007) << 6 + | (mode->cur_mode & 0007) << 3 | (mode->cur_mode & 0007); break; default: -- cgit v0.9.1