aboutsummaryrefslogtreecommitdiff
path: root/ext/userauth/userauth.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2014-09-11 00:27:53 +0000
committerdrh <drh@noemail.net>2014-09-11 00:27:53 +0000
commitd39c40ff5e89601a242f004faa45735e80275fcb (patch)
treed3ec2397a2362c249668d09c7f6c384531670256 /ext/userauth/userauth.c
parent09e60541aecde780c2d16d7d7e8284235247b375 (diff)
downloadsqlite-d39c40ff5e89601a242f004faa45735e80275fcb.tar.gz
sqlite-d39c40ff5e89601a242f004faa45735e80275fcb.zip
Reorder parameters on the sqlite3_user_*() interfaces for consistency.
Add the first TCL test cases. FossilOrigin-Name: 2f6d8f32eef526b5912f42ab467e3c7812480d8b
Diffstat (limited to 'ext/userauth/userauth.c')
-rw-r--r--ext/userauth/userauth.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/userauth/userauth.c b/ext/userauth/userauth.c
index 5e00c5cfb..343e49e6f 100644
--- a/ext/userauth/userauth.c
+++ b/ext/userauth/userauth.c
@@ -177,8 +177,8 @@ void sqlite3CryptFunc(
int sqlite3_user_authenticate(
sqlite3 *db, /* The database connection */
const char *zUsername, /* Username */
- int nPW, /* Number of bytes in aPW[] */
- const char *zPW /* Password or credentials */
+ const char *zPW, /* Password or credentials */
+ int nPW /* Number of bytes in aPW[] */
){
int rc;
u8 authLevel = UAUTH_Fail;
@@ -217,9 +217,9 @@ int sqlite3_user_authenticate(
int sqlite3_user_add(
sqlite3 *db, /* Database connection */
const char *zUsername, /* Username to be added */
- int isAdmin, /* True to give new user admin privilege */
+ const char *aPW, /* Password or credentials */
int nPW, /* Number of bytes in aPW[] */
- const char *aPW /* Password or credentials */
+ int isAdmin /* True to give new user admin privilege */
){
sqlite3_stmt *pStmt;
int rc;
@@ -248,7 +248,7 @@ int sqlite3_user_add(
if( rc ) return rc;
if( db->auth.zAuthUser==0 ){
assert( isAdmin!=0 );
- sqlite3_user_authenticate(db, zUsername, nPW, aPW);
+ sqlite3_user_authenticate(db, zUsername, aPW, nPW);
}
return SQLITE_OK;
}
@@ -263,9 +263,9 @@ int sqlite3_user_add(
int sqlite3_user_change(
sqlite3 *db, /* Database connection */
const char *zUsername, /* Username to change */
- int isAdmin, /* Modified admin privilege for the user */
+ const char *aPW, /* Modified password or credentials */
int nPW, /* Number of bytes in aPW[] */
- const char *aPW /* Modified password or credentials */
+ int isAdmin /* Modified admin privilege for the user */
){
sqlite3_stmt *pStmt;
if( db->auth.authLevel<UAUTH_User ){