summaryrefslogtreecommitdiff
path: root/accel-pppd/extra/pppd_compat.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2015-12-25 21:54:22 +0300
committerDmitry Kozlov <xeb@mail.ru>2015-12-25 21:56:26 +0300
commit44e5c8e3d333f547d04090ad2ad2ebdbb37d3e58 (patch)
treea756ee990dfa8ac1cc92e120bac18358cc495503 /accel-pppd/extra/pppd_compat.c
parentb9054dd37340aceebddfba354922fc730e0607cf (diff)
downloadaccel-ppp-44e5c8e3d333f547d04090ad2ad2ebdbb37d3e58.tar.gz
accel-ppp-44e5c8e3d333f547d04090ad2ad2ebdbb37d3e58.zip
pppd_compat: change mode of radattr files to 0644
Diffstat (limited to 'accel-pppd/extra/pppd_compat.c')
-rw-r--r--accel-pppd/extra/pppd_compat.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/accel-pppd/extra/pppd_compat.c b/accel-pppd/extra/pppd_compat.c
index 2928899..5ec2606 100644
--- a/accel-pppd/extra/pppd_compat.c
+++ b/accel-pppd/extra/pppd_compat.c
@@ -8,6 +8,7 @@
#include <limits.h>
#include <inttypes.h>
#include <sys/ioctl.h>
+#include <sys/stat.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "linux_ppp.h"
@@ -436,8 +437,10 @@ static void write_radattr(struct pppd_compat_pd *pd, struct rad_packet_t *pack)
fd = mkstemp(fname1);
if (fd < 0)
log_ppp_warn("pppd_compat: mkstemp: %s\n", strerror(errno));
- else
+ else {
+ fchmod(fd, 0644);
f = fdopen(fd, "w");
+ }
}
if (f) {