diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2023-06-27 20:06:18 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2023-06-27 20:06:18 (EDT) |
commit | 2fa297f54c742260e96ee05b1ea6d1098b82d850 (patch) | |
tree | 32dbcd9e6b6dccbb5460b73c8c47b40cb53a9fb3 /helpers | |
parent | 85fba945981a00e6a5e5c95dff31940887456627 (diff) |
helpers/mode: Fix permcopy shifts
Diffstat (limited to 'helpers')
-rw-r--r-- | helpers/mode.c | 12 |
1 files changed, 6 insertions, 6 deletions
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: |