-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hi Experts.
I am running the iptables 1.8.2.4, when i run iptables as a non root user i am getting the below error
"Fatal: can't open lock file /run/xtables.lock: Permission denied" but this is not the case in the iptable 1.4.8 it works fine for both root and none root user. when i check the 1.8.2.4 code below code is introduced but it is not there in the 1.4.8, Please let me know why this changes in the newer version of the iptables.
static int xtables_lock(int wait, struct timeval *wait_interval)
{
struct timeval time_left, wait_time;
int fd, i = 0;
time_left.tv_sec = wait;
time_left.tv_usec = 0;
fd = **open(XT_LOCK_NAME, O_CREAT, 0600)**;
if (fd < 0) {
fprintf(stderr, "Fatal: can't open lock file %s: %s\n",
XT_LOCK_NAME, strerror(errno));
return XT_LOCK_FAILED;
}
Thanks
Koti
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels