Add comment to GSSAPI insert string

The comment explain why the last two values have no quotes.
This commit is contained in:
Markus Mäkelä 2017-01-30 15:28:47 +02:00
parent 03067b586c
commit b23649409f

View File

@ -66,7 +66,12 @@ static const char gssapi_auth_query[] =
/** Delete query used to clean up the database before loading new users */
static const char delete_query[] = "DELETE FROM " GSSAPI_TABLE_NAME;
/** The insert query template which adds users to the gssapi_users table */
/**
* The insert query template which adds users to the gssapi_users table.
*
* Note that the last two values are strings that can be NULL and thus they have
* no quoted around them. The quotes for strings are added in add_gssapi_user().
*/
static const char insert_sql_pattern[] =
"INSERT INTO " GSSAPI_TABLE_NAME " VALUES ('%s', '%s', %s, %s, %s)";