17 lines
558 B
Diff
17 lines
558 B
Diff
|
diff -up open-iscsi-2.0-870-rc1/usr/iscsiadm.c.error open-iscsi-2.0-870-rc1/usr/iscsiadm.c
|
||
|
--- open-iscsi-2.0-870-rc1/usr/iscsiadm.c.error 2008-09-30 10:20:15.000000000 +0200
|
||
|
+++ open-iscsi-2.0-870-rc1/usr/iscsiadm.c 2008-09-30 10:20:15.000000000 +0200
|
||
|
@@ -2141,6 +2141,12 @@ main(int argc, char **argv)
|
||
|
if (mode < 0)
|
||
|
usage(0);
|
||
|
|
||
|
+ if (getuid()) {
|
||
|
+ log_error("Must be run as root.");
|
||
|
+ rc = -1;
|
||
|
+ goto free_ifaces;
|
||
|
+ }
|
||
|
+
|
||
|
if (mode == MODE_FW) {
|
||
|
if ((rc = verify_mode_params(argc, argv, "ml", 0))) {
|
||
|
log_error("fw mode: option '-%c' is not "
|