netsniff-ng: Open pcap w/o O_NOATIME on 2nd try
commitf6d211974eff4ba67461262031af54fdb4f54210
authorVadim Kochan <vadim4j@gmail.com>
Thu, 7 May 2015 05:48:19 +0000 (7 08:48 +0300)
committerTobias Klauser <tklauser@distanz.ch>
Thu, 7 May 2015 10:00:07 +0000 (7 12:00 +0200)
tree74dbca2eedda4ac963c3ee5b312654aca9ff7571
parent096b043a8581ad43f030323a69b4e6c6e78530fa
netsniff-ng: Open pcap w/o O_NOATIME on 2nd try

If the file open fails with O_NOATIME option then try to open it w/o
this option in case if the user does not have enough prvileges to use
O_NOATIME.

It fixes the case when user made pcap file in sudo mode but after it
should still use sudo to read it because of setting O_NOATIME option
requires higher privileges.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
netsniff-ng.c