summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-07-09 11:49:06 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-07-09 11:49:06 +0200
commit6168c115630469d9ace083fb785719f212d0157c (patch)
tree890b6e7c423f9be98cd8e111545c9e3ea82d3ad5
parent376333b39247839499fb90e95f3e1db944a2a0b9 (diff)
envstore: Try to produce slightly more helpful error messages
-rwxr-xr-xbin/envstore6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/envstore b/bin/envstore
index 42284a0..b9d6d66 100755
--- a/bin/envstore
+++ b/bin/envstore
@@ -31,12 +31,12 @@ sub check_store {
}
($mode, $uid) = (stat($store_file))[2,4];
if ($uid != $<) {
- print STDERR "envstore: store file not owned by us\n";
+ print STDERR "envstore: store file is insecure (not owned by us)\n";
exit(1);
}
$mode &= 0x00077;
if ($mode > 0) {
- print STDERR "envstore: store file writable by group/others\n";
+ print STDERR "envstore: store file is insecure (writable by group/others)\n";
exit(1);
}
return(1);
@@ -58,7 +58,7 @@ sub get_keyvalue {
if (exists($ENV{$key})) {
$value = $ENV{$key};
} else {
- print STDERR "No such parameter: $key\n";
+ print STDERR "No such parameter: $key (perhaps you forgot to export it?)\n";
exit(1);
}
}