From 9696d6358a3da209b43ae8e4726c47fd3a79a448 Mon Sep 17 00:00:00 2001
From: Nigel Kukard <nkukard@lbsd.net>
Date: Fri, 27 Feb 2009 08:22:51 +0000
Subject: [PATCH] * Fixed typo in database tsql file * Added template queries
 to the smradiusd.conf file

---
 database/core.tsql |  2 +-
 smradiusd.conf     | 20 +++++++-------------
 2 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/database/core.tsql b/database/core.tsql
index 31dc6140..42c3919f 100644
--- a/database/core.tsql
+++ b/database/core.tsql
@@ -48,7 +48,7 @@ CREATE INDEX @PREFIX@groups_idx1 ON @PREFIX@groups (Name);
 
 
 /* Group attributes */
-CREATE TABLE @PREFIX@group_check_items (
+CREATE TABLE @PREFIX@group_attributes (
 	ID			@SERIAL_TYPE@,
 
 	Name			VARCHAR(255) NOT NULL,
diff --git a/smradiusd.conf b/smradiusd.conf
index ba35dcc4..02df3c1f 100644
--- a/smradiusd.conf
+++ b/smradiusd.conf
@@ -107,38 +107,32 @@ mod_userdb_test
 mod_userdb_sql
 EOT
 
-# ========================================================================================
 
+[mod_userdb_sql]
 
 sql_password_query=<<EOT
-SELECT ID, Password FROM Users WHERE Username = %u
+SELECT ID, Password FROM users WHERE Username = %u
 EOT
 
 sql_failure_query=<<EOT
 INSERT INTO AuthFail (Username) VALUES (%u)
 EOT
 
-
-
-
-
-
-
-
-[authorization]
 sql_user_attribute_query=<<EOT
-SELECT Attribute, OP, Value FROM UserAttributes WHERE UserID = ${user.id}
+SELECT Attribute, Operator, Value FROM user_attributes WHERE UserID = ${user.id}
 EOT
 
 sql_group_query=<<EOT
-SELECT GroupID FROM UsersToGroups WHERE UserID = ${user.id}
+SELECT GroupID FROM users_to_groups WHERE UserID = ${user.id}
 EOT
 
 sql_group_attribute_query=<<EOT
-SELECT Attribute, OP, Value FROM GroupAttributes WHERE GroupID = ${group.id}
+SELECT Attribute, Operator, Value FROM group_attributes WHERE GroupID = ${group.id}
 EOT
 
 
+# ========================================================================================
+
 
 [accounting]
 plugins=<<EOT
-- 
GitLab