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