mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
Fix
md5 -q -s foo to not expect input on stdin after hashing the string. MFC after: 1 week
This commit is contained in:
parent
96efd94a01
commit
dc015e16dc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=88226
@ -39,6 +39,7 @@ static const char rcsid[] =
|
|||||||
|
|
||||||
int qflag;
|
int qflag;
|
||||||
int rflag;
|
int rflag;
|
||||||
|
int sflag;
|
||||||
|
|
||||||
static void MDString(const char *);
|
static void MDString(const char *);
|
||||||
static void MDTimeTrial(void);
|
static void MDTimeTrial(void);
|
||||||
@ -74,6 +75,7 @@ main(int argc, char *argv[])
|
|||||||
rflag = 1;
|
rflag = 1;
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
|
sflag = 1;
|
||||||
MDString(optarg);
|
MDString(optarg);
|
||||||
break;
|
break;
|
||||||
case 't':
|
case 't':
|
||||||
@ -101,7 +103,7 @@ main(int argc, char *argv[])
|
|||||||
else
|
else
|
||||||
printf("MD5 (%s) = %s\n", *argv, p);
|
printf("MD5 (%s) = %s\n", *argv, p);
|
||||||
} while (*++argv);
|
} while (*++argv);
|
||||||
} else if (optind == 1 || qflag || rflag)
|
} else if (!sflag && (optind == 1 || qflag || rflag))
|
||||||
MDFilter(0);
|
MDFilter(0);
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
|
Loading…
Reference in New Issue
Block a user