diff options
Diffstat (limited to 'findutils')
-rw-r--r-- | findutils/find.c | 8 | ||||
-rw-r--r-- | findutils/grep.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/findutils/find.c b/findutils/find.c index 56a7ed3ab..83aa63f92 100644 --- a/findutils/find.c +++ b/findutils/find.c | |||
@@ -558,8 +558,8 @@ ACTF(type) | |||
558 | #if ENABLE_FEATURE_FIND_PERM | 558 | #if ENABLE_FEATURE_FIND_PERM |
559 | ACTF(perm) | 559 | ACTF(perm) |
560 | { | 560 | { |
561 | /* -perm +mode: at least one of perm_mask bits are set */ | 561 | /* -perm [+/]mode: at least one of perm_mask bits are set */ |
562 | if (ap->perm_char == '+') | 562 | if (ap->perm_char == '+' || ap->perm_char == '/') |
563 | return (statbuf->st_mode & ap->perm_mask) != 0; | 563 | return (statbuf->st_mode & ap->perm_mask) != 0; |
564 | /* -perm -mode: all of perm_mask are set */ | 564 | /* -perm -mode: all of perm_mask are set */ |
565 | if (ap->perm_char == '-') | 565 | if (ap->perm_char == '-') |
@@ -1252,14 +1252,14 @@ static action*** parse_params(char **argv) | |||
1252 | /* -perm BITS File's mode bits are exactly BITS (octal or symbolic). | 1252 | /* -perm BITS File's mode bits are exactly BITS (octal or symbolic). |
1253 | * Symbolic modes use mode 0 as a point of departure. | 1253 | * Symbolic modes use mode 0 as a point of departure. |
1254 | * -perm -BITS All of the BITS are set in file's mode. | 1254 | * -perm -BITS All of the BITS are set in file's mode. |
1255 | * -perm +BITS At least one of the BITS is set in file's mode. | 1255 | * -perm [+/]BITS At least one of the BITS is set in file's mode. |
1256 | */ | 1256 | */ |
1257 | else if (parm == PARM_perm) { | 1257 | else if (parm == PARM_perm) { |
1258 | action_perm *ap; | 1258 | action_perm *ap; |
1259 | dbg("%d", __LINE__); | 1259 | dbg("%d", __LINE__); |
1260 | ap = ALLOC_ACTION(perm); | 1260 | ap = ALLOC_ACTION(perm); |
1261 | ap->perm_char = arg1[0]; | 1261 | ap->perm_char = arg1[0]; |
1262 | arg1 = plus_minus_num(arg1); | 1262 | arg1 = (arg1[0] == '/' ? arg1+1 : plus_minus_num(arg1)); |
1263 | /*ap->perm_mask = 0; - ALLOC_ACTION did it */ | 1263 | /*ap->perm_mask = 0; - ALLOC_ACTION did it */ |
1264 | if (!bb_parse_mode(arg1, &ap->perm_mask)) | 1264 | if (!bb_parse_mode(arg1, &ap->perm_mask)) |
1265 | bb_error_msg_and_die("invalid mode '%s'", arg1); | 1265 | bb_error_msg_and_die("invalid mode '%s'", arg1); |
diff --git a/findutils/grep.c b/findutils/grep.c index 615cacac4..0336b2927 100644 --- a/findutils/grep.c +++ b/findutils/grep.c | |||
@@ -676,7 +676,7 @@ static int grep_dir(const char *dir) | |||
676 | int matched = 0; | 676 | int matched = 0; |
677 | recursive_action(dir, | 677 | recursive_action(dir, |
678 | /* recurse=yes */ ACTION_RECURSE | | 678 | /* recurse=yes */ ACTION_RECURSE | |
679 | /* followLinks=no */ | 679 | /* followLinks=command line only */ ACTION_FOLLOWLINKS_L0 | |
680 | /* depthFirst=yes */ ACTION_DEPTHFIRST, | 680 | /* depthFirst=yes */ ACTION_DEPTHFIRST, |
681 | /* fileAction= */ file_action_grep, | 681 | /* fileAction= */ file_action_grep, |
682 | /* dirAction= */ NULL, | 682 | /* dirAction= */ NULL, |