*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
- * Copyright 2000 The FreeRADIUS server project
+ * Copyright 2000,2006 The FreeRADIUS server project
* Copyright 2000 Jeff Carneal <jeff@apex.net>
* Copyright 2000 Alan Curry <pacman@world.std.com>
*/
-static const char rcsid[] = "$Id$";
-#include <freeradius-devel/autoconf.h>
+#include <freeradius-devel/ident.h>
+RCSID("$Id$")
+
+#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