diff options
author | Jason King <jason.brian.king@gmail.com> | 2017-09-15 20:10:47 +0000 |
---|---|---|
committer | Jason King <jason.brian.king@gmail.com> | 2017-09-22 16:19:09 +0000 |
commit | dd401fc0215a67c8c4a61a2f810ae471f1265a05 (patch) | |
tree | f34d1bd133bfb60c1ad44c03bc916bee144e4463 | |
parent | 81eea0cac9755cf17a2531be72cfafd68358db1a (diff) | |
download | illumos-joyent-OS-3042.tar.gz |
OS-3042 Unable to fix bad coreadm pathsOS-3042
-rw-r--r-- | usr/src/cmd/coreadm/coreadm.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/usr/src/cmd/coreadm/coreadm.c b/usr/src/cmd/coreadm/coreadm.c index 9ce0f27651..f47f595ca3 100644 --- a/usr/src/cmd/coreadm/coreadm.c +++ b/usr/src/cmd/coreadm/coreadm.c @@ -21,6 +21,8 @@ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * + * Copyright (c) 2017, Joyent, Inc. */ #include <stdio.h> @@ -243,6 +245,12 @@ main(int argc, char **argv) command); usage(); } + if (glob_pattern != NULL && glob_pattern[0] != '/') { + (void) fprintf(stderr, gettext( + "%s: The -g option must specify an absolute path\n"), + command); + usage(); + } if ((proc_pattern != NULL || proc_content != CC_CONTENT_INVALID) && npids == 0) { (void) sprintf(curpid, "%u", (uint_t)getppid()); |