swapon_checks(): add check st_uid == 0?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi *,

similar to the check for (st_mode == 0600), why not add a check
for the correct owner (root) to the swapon utility?

swapon.c:
swapon_checks(const char *special)
{
	...
	if (verbose) {
	    if (S_ISREG(st.st_mode)) {
		    if (st.st_uid != 0)
			    warnx(_("%s: insecure file owner %d, 0 (root) suggested."),
				    special, st.st_uid);
		    }
	}
	...
}

Have a nice day,
Berny


--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux