diff --git a/common/rpc-service.c b/common/rpc-service.c index b7633b0..0cbca4c 100644 --- a/common/rpc-service.c +++ b/common/rpc-service.c @@ -1163,12 +1163,12 @@ set_pwd_hash_to_commit (SeafCommit *commit, } int -seafile_upgrade_repo_enc_algorithm (const char *repo_id, - const char *user, - const char *passwd, - const char *pwd_hash_algo, - const char *pwd_hash_params, - GError **error) +seafile_upgrade_repo_pwd_hash_algorithm (const char *repo_id, + const char *user, + const char *passwd, + const char *pwd_hash_algo, + const char *pwd_hash_params, + GError **error) { SeafRepo *repo = NULL; SeafCommit *commit = NULL, *parent = NULL; diff --git a/include/seafile-rpc.h b/include/seafile-rpc.h index b987852..14b48c5 100644 --- a/include/seafile-rpc.h +++ b/include/seafile-rpc.h @@ -151,12 +151,12 @@ seafile_change_repo_passwd (const char *repo_id, GError **error); int -seafile_upgrade_repo_enc_algorithm (const char *repo_id, - const char *user, - const char *passwd, - const char *pwd_hash_algo, - const char *pwd_hash_params, - GError **error); +seafile_upgrade_repo_pwd_hash_algorithm (const char *repo_id, + const char *user, + const char *passwd, + const char *pwd_hash_algo, + const char *pwd_hash_params, + GError **error); /** * seafile_repo_size: diff --git a/python/seafile/rpcclient.py b/python/seafile/rpcclient.py index 400a14d..8c6d406 100644 --- a/python/seafile/rpcclient.py +++ b/python/seafile/rpcclient.py @@ -642,9 +642,9 @@ class SeafServerThreadedRpcClient(NamedPipeClient): # Upgrade repo enc algorithm @searpc_func("int", ["string", "string", "string", "string", "string"]) - def seafile_upgrade_repo_enc_algorithm (repo_id, user, passwd, pwd_hash_algo, pwd_hash_params): + def seafile_upgrade_repo_pwd_hash_algorithm (repo_id, user, passwd, pwd_hash_algo, pwd_hash_params): pass - upgrade_repo_enc_algorithm = seafile_upgrade_repo_enc_algorithm + upgrade_repo_pwd_hash_algorithm = seafile_upgrade_repo_pwd_hash_algorithm # Clean trash @searpc_func("int", ["string", "int"]) diff --git a/python/seaserv/api.py b/python/seaserv/api.py index 381a780..2940dd9 100644 --- a/python/seaserv/api.py +++ b/python/seaserv/api.py @@ -73,9 +73,9 @@ class SeafileAPI(object): return seafserv_threaded_rpc.change_repo_passwd(repo_id, old_passwd, new_passwd, user) - def upgrade_repo_enc_algorithm (self, repo_id, user, passwd, pwd_hash_algo, pwd_hash_params): - return seafserv_threaded_rpc.upgrade_repo_enc_algorithm (repo_id, user, passwd, - pwd_hash_algo, pwd_hash_params) + def upgrade_repo_pwd_hash_algorithm (self, repo_id, user, passwd, pwd_hash_algo, pwd_hash_params): + return seafserv_threaded_rpc.upgrade_repo_pwd_hash_algorithm (repo_id, user, passwd, + pwd_hash_algo, pwd_hash_params) def check_passwd(self, repo_id, magic): return seafserv_threaded_rpc.check_passwd(repo_id, magic) diff --git a/server/seaf-server.c b/server/seaf-server.c index 8847834..e6f494c 100644 --- a/server/seaf-server.c +++ b/server/seaf-server.c @@ -121,8 +121,8 @@ static void start_rpc_service (const char *seafile_dir, searpc_signature_int__string_string_string_string()); searpc_server_register_function ("seafserv-threaded-rpcserver", - seafile_upgrade_repo_enc_algorithm, - "seafile_upgrade_repo_enc_algorithm", + seafile_upgrade_repo_pwd_hash_algorithm, + "seafile_upgrade_repo_pwd_hash_algorithm", searpc_signature_int__string_string_string_string_string()); searpc_server_register_function ("seafserv-threaded-rpcserver", diff --git a/tests/test_password/test_password.py b/tests/test_password/test_password.py index 09d799f..7cbbb7f 100644 --- a/tests/test_password/test_password.py +++ b/tests/test_password/test_password.py @@ -98,7 +98,7 @@ def test_upgrade_pwd_hash(enc_version, algo, params): if enc_version > 2: assert len(repo.salt) == 64 - api.upgrade_repo_enc_algorithm (repo.repo_id, USER, test_repo_passwd, algo, params) == 0 + api.upgrade_repo_pwd_hash_algorithm (repo.repo_id, USER, test_repo_passwd, algo, params) == 0 repo = api.get_repo(repo_id) assert repo.pwd_hash_algo == algo;