Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115664535
D43871.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D43871.diff
View Options
diff --git a/sbin/md5/md5.1 b/sbin/md5/md5.1
--- a/sbin/md5/md5.1
+++ b/sbin/md5/md5.1
@@ -129,6 +129,7 @@
.Pq Note that this option is not yet useful if multiple files are specified.
.It Fl p , -passthrough
Echo stdin to stdout and append the checksum to stdout.
+In this mode, any files specified on the command line are silently ignored.
.It Fl q , -quiet
Quiet mode \(em only the checksum is printed out.
Overrides the
@@ -146,6 +147,7 @@
.It Fl s Ar string , Fl -string= Ns Ar string
Print a checksum of the given
.Ar string .
+In this mode, any files specified on the command line are silently ignored.
.It Fl t , Fl -time-trial
Run a built-in time trial.
For the
diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c
--- a/sbin/md5/md5.c
+++ b/sbin/md5/md5.c
@@ -606,7 +606,7 @@
err(1, "Unable to enter capability mode");
#endif
- if (*argv) {
+ if (*argv && !pflag && string == NULL) {
do {
const char *filename = *argv;
const char *filemode = "rb";
diff --git a/sbin/md5/tests/md5_test.sh b/sbin/md5/tests/md5_test.sh
--- a/sbin/md5/tests/md5_test.sh
+++ b/sbin/md5/tests/md5_test.sh
@@ -204,6 +204,8 @@
for opt in -q -qr -rq ; do
atf_check -o inline:\"\$out_${i}_${alg}\n\" ${alg} \${opt} in
done
+ atf_check -o inline:\"\$inp_${i}\$out_${i}_${alg}\n\" ${alg} -p <in
+ atf_check -o inline:\"\$out_${i}_${alg}\n\" ${alg} -s \"\$inp_${i}\"
}
"
eval "
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 27, 7:08 PM (12 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17821094
Default Alt Text
D43871.diff (1 KB)
Attached To
Mode
D43871: md5: Ignore files in string and passthrough mode.
Attached
Detach File
Event Timeline
Log In to Comment