Bug 277677

Summary: /bin/rmdir should exit with status code 2 for invalid arguments
Product: Base System Reporter: Henrich Hartzer <henrichhartzer>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
/bin/rmdir patch none

Description Henrich Hartzer 2024-03-13 22:41:27 UTC
Created attachment 249139 [details]
/bin/rmdir patch

/bin/rmdir should exit with status 2 if invalid arguments are passed.
Comment 1 Henrich Hartzer 2024-04-10 21:49:57 UTC
Opened a pull request for this: https://github.com/freebsd/freebsd-src/pull/1161
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-05-11 19:16:49 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=9bcc1b18c119148e4455e548c90b2bc9cef16d1b

commit 9bcc1b18c119148e4455e548c90b2bc9cef16d1b
Author:     Henrich Hartzer <henrichhartzer@tuta.io>
AuthorDate: 2024-05-10 17:53:49 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-05-11 19:13:28 +0000

    /bin/rmdir: Exit with status 2 for invalid arguments

    PR: 277677

    Signed-off-by: Henrich Hartzer <henrichhartzer@tuta.io>
    Reviewed by: imp
    Pull Request: https://github.com/freebsd/freebsd-src/pull/1161

 bin/rmdir/rmdir.1             | 15 ++++++++-------
 bin/rmdir/rmdir.c             |  2 +-
 bin/rmdir/tests/rmdir_test.sh |  6 +++---
 3 files changed, 12 insertions(+), 11 deletions(-)