|
10 | 10 | * University of Stuttgart. All rights reserved. |
11 | 11 | * Copyright (c) 2004-2005 The Regents of the University of California. |
12 | 12 | * All rights reserved. |
13 | | - * Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved. |
| 13 | + * Copyright (c) 2006-2017 Cisco Systems, Inc. All rights reserved |
14 | 14 | * Copyright (c) 2007-2009 Sun Microsystems, Inc. All rights reserved. |
15 | 15 | * Copyright (c) 2007-2016 Los Alamos National Security, LLC. All rights |
16 | 16 | * reserved. |
@@ -221,18 +221,22 @@ int main(int argc, char *argv[]) |
221 | 221 | * exit with a giant warning flag |
222 | 222 | */ |
223 | 223 | if (0 == geteuid() && !myglobals.run_as_root) { |
| 224 | + /* show_help is not yet available, so print an error manually */ |
224 | 225 | fprintf(stderr, "--------------------------------------------------------------------------\n"); |
225 | 226 | if (myglobals.help) { |
226 | | - fprintf(stderr, "%s cannot provide the help message when run as root\n", orte_basename); |
| 227 | + fprintf(stderr, "%s cannot provide the help message when run as root.\n\n", orte_basename); |
227 | 228 | } else { |
228 | | - /* show_help is not yet available, so print an error manually */ |
229 | | - fprintf(stderr, "%s has detected an attempt to run as root.\n", orte_basename); |
| 229 | + fprintf(stderr, "%s has detected an attempt to run as root.\n\n", orte_basename); |
230 | 230 | } |
231 | | - fprintf(stderr, " This is *strongly* discouraged as any mistake (e.g., in defining TMPDIR) or bug can\n"); |
232 | | - fprintf(stderr, "result in catastrophic damage to the OS file system, leaving\n"); |
233 | | - fprintf(stderr, "your system in an unusable state.\n\n"); |
| 231 | + |
| 232 | + fprintf(stderr, "Running at root is *strongly* discouraged as any mistake (e.g., in\n"); |
| 233 | + fprintf(stderr, "defining TMPDIR) or bug can result in catastrophic damage to the OS\n"); |
| 234 | + fprintf(stderr, "file system, leaving your system in an unusable state.\n\n"); |
| 235 | + |
| 236 | + fprintf(stderr, "We strongly suggest that you run %s as a non-root user.\n\n", orte_basename); |
| 237 | + |
234 | 238 | fprintf(stderr, "You can override this protection by adding the --allow-run-as-root\n"); |
235 | | - fprintf(stderr, "option to your cmd line. However, we reiterate our strong advice\n"); |
| 239 | + fprintf(stderr, "option to your command line. However, we reiterate our strong advice\n"); |
236 | 240 | fprintf(stderr, "against doing so - please do so at your own risk.\n"); |
237 | 241 | fprintf(stderr, "--------------------------------------------------------------------------\n"); |
238 | 242 | exit(1); |
|
0 commit comments