diff options
-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()); |