summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason King <jason.brian.king@gmail.com>2017-09-15 20:10:47 +0000
committerJason King <jason.brian.king@gmail.com>2017-09-22 16:19:09 +0000
commitdd401fc0215a67c8c4a61a2f810ae471f1265a05 (patch)
treef34d1bd133bfb60c1ad44c03bc916bee144e4463
parent81eea0cac9755cf17a2531be72cfafd68358db1a (diff)
downloadillumos-joyent-OS-3042.tar.gz
OS-3042 Unable to fix bad coreadm pathsOS-3042
-rw-r--r--usr/src/cmd/coreadm/coreadm.c8
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());