* Author: Nicolas Baradakis <nicolas.baradakis@cegetel.net>
*
* Copyright (C) 2005 Cegetel
+ * Copyright 2006 The FreeRADIUS server project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
*
* 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
*/
-#include <freeradius-devel/autoconf.h>
+#include <freeradius-devel/ident.h>
+RCSID("$Id$")
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-
-#include <freeradius-devel/libradius.h>
#include <freeradius-devel/radiusd.h>
#include <freeradius-devel/modules.h>
-#include <freeradius-devel/conffile.h>
-static const char rcsid[] = "$Id$";
+#include <fcntl.h>
+#include <sys/stat.h>
static int sql_log_instantiate(CONF_SECTION *conf, void **instance);
static int sql_log_detach(void *instance);
pairdelete(&request->packet->vps, PW_SQL_USER_NAME);
if (username != NULL) {
- strNcpy(tmpuser, username, MAX_STRING_LEN);
+ strlcpy(tmpuser, username, MAX_STRING_LEN);
} else if (inst->sql_user_name[0] != '\0') {
radius_xlat(tmpuser, sizeof(tmpuser), inst->sql_user_name,
request, NULL);
}
if (tmpuser[0] != '\0') {
- strNcpy(sqlusername, tmpuser, sizeof(tmpuser));
+ strlcpy(sqlusername, tmpuser, sizeof(tmpuser));
DEBUG2("rlm_sql_log (%s): sql_set_user escaped user --> '%s'",
inst->name, sqlusername);
vp = pairmake("SQL-User-Name", sqlusername, 0);