X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fplugins%2Fradius%2Fradattr.c;h=16f7fba0f1b1680bf986971ee9818291dd50367c;hb=ebe6b4ad00c2290a9147b9bedb57c1c49bb18b02;hp=1fe7daa551613049a783135beaabf8147b60e035;hpb=cbb598e017f8808949953dc57e42c8cf4e9aeb92;p=ppp.git diff --git a/pppd/plugins/radius/radattr.c b/pppd/plugins/radius/radattr.c index 1fe7daa..16f7fba 100644 --- a/pppd/plugins/radius/radattr.c +++ b/pppd/plugins/radius/radattr.c @@ -17,15 +17,17 @@ static char const RCSID[] = "$Id: radattr.c,v 1.2 2004/10/28 00:24:40 paulus Exp $"; -#include "pppd.h" -#include "radiusclient.h" #include +#include +#include + +#include "radiusclient.h" extern void (*radius_attributes_hook)(VALUE_PAIR *); static void print_attributes(VALUE_PAIR *); static void cleanup(void *opaque, int arg); -char pppd_version[] = VERSION; +char pppd_version[] = PPPD_VERSION; /********************************************************************** * %FUNCTION: plugin_init @@ -71,9 +73,12 @@ print_attributes(VALUE_PAIR *vp) char name[2048]; char value[2048]; int cnt = 0; + mode_t old_umask; slprintf(fname, sizeof(fname), "/var/run/radattr.%s", ifname); + old_umask = umask(077); fp = fopen(fname, "w"); + umask(old_umask); if (!fp) { warn("radattr plugin: Could not open %s for writing: %m", fname); return;