From b23649409f893462db8a4b2af1ddc3063ced29bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 30 Jan 2017 15:28:47 +0200 Subject: [PATCH] Add comment to GSSAPI insert string The comment explain why the last two values have no quotes. --- .../modules/authenticator/GSSAPI/GSSAPIAuth/gssapi_auth.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/modules/authenticator/GSSAPI/GSSAPIAuth/gssapi_auth.c b/server/modules/authenticator/GSSAPI/GSSAPIAuth/gssapi_auth.c index 2067f4378..e19fc8d09 100644 --- a/server/modules/authenticator/GSSAPI/GSSAPIAuth/gssapi_auth.c +++ b/server/modules/authenticator/GSSAPI/GSSAPIAuth/gssapi_auth.c @@ -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)";