From 183228f8d58a55c35745f3123724c787a36e8fbe Mon Sep 17 00:00:00 2001 From: Emmanuel Roullit Date: Thu, 6 May 2010 19:56:15 +0000 Subject: [PATCH] According to access(2), it is not a good idea to use access to check if there is enough file permissions... And anyway open() checks for it. git-svn-id: http://netsniff-ng.googlecode.com/svn/trunk@357 21e0ff64-9a0b-11de-825e-994487f65616 --- netsniff-ng/lib/config.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/netsniff-ng/lib/config.c b/netsniff-ng/lib/config.c index 4b5fd26e..85833d63 100644 --- a/netsniff-ng/lib/config.c +++ b/netsniff-ng/lib/config.c @@ -182,11 +182,6 @@ void set_configuration(int argc, char **argv, system_data_t * sd) case 'r': sd->mode = MODE_REPLAY; - if (access(optarg, R_OK) != 0) { - err("Insufficient permission to access %s\n", optarg); - exit(EXIT_FAILURE); - } - sd->pcap_fd = open(optarg, O_RDONLY); if (sd->pcap_fd == -1) { err("Can't open file"); @@ -197,11 +192,6 @@ void set_configuration(int argc, char **argv, system_data_t * sd) case 'i': sd->mode = MODE_READ; - if (access(optarg, R_OK) != 0) { - err("Insufficient permission to access %s\n", optarg); - exit(EXIT_FAILURE); - } - sd->pcap_fd = open(optarg, O_RDONLY); if (sd->pcap_fd == -1) { err("Can't open file"); -- 2.11.4.GIT