#include <freeradius-devel/ident.h>
RCSID("$Id$")
-#include <freeradius-devel/autoconf.h>
+#include <freeradius-devel/radiusd.h>
-#include <stdlib.h>
-#include <string.h>
#include <grp.h>
#include <pwd.h>
-#include <sys/types.h>
#include <sys/stat.h>
#include "config.h"
# include <siad.h>
#endif
-#include <freeradius-devel/radiusd.h>
#include <freeradius-devel/modules.h>
#include <freeradius-devel/sysutmp.h>
static int unix_detach(void *instance)
{
#define inst ((struct unix_instance *)instance)
- if (inst->radwtmp)
- free(inst->radwtmp);
paircompare_unregister(PW_GROUP, groupcmp);
#ifdef PW_GROUP_NAME
if (vp->length >= sizeof(ut.ut_name)) {
memcpy(ut.ut_name, (char *)vp->vp_strvalue, sizeof(ut.ut_name));
} else {
- strNcpy(ut.ut_name, (char *)vp->vp_strvalue, sizeof(ut.ut_name));
+ strlcpy(ut.ut_name, (char *)vp->vp_strvalue, sizeof(ut.ut_name));
}
break;
case PW_LOGIN_IP_HOST:
* and address so that the tty field is unique.
*/
sprintf(buf, "%03d:%s", nas_port, s);
- strNcpy(ut.ut_line, buf, sizeof(ut.ut_line));
+ strlcpy(ut.ut_line, buf, sizeof(ut.ut_line));
/*
* We store the dynamic IP address in the hostname field.
#ifdef UT_HOSTSIZE
if (framed_address) {
ip_ntoa(buf, framed_address);
- strncpy(ut.ut_host, buf, sizeof(ut.ut_host));
+ strlcpy(ut.ut_host, buf, sizeof(ut.ut_host));
}
#endif
#ifdef HAVE_UTMPX_H