diff options
author | teor <teor2345@gmail.com> | 2016-11-02 14:11:26 +1100 |
---|---|---|
committer | teor <teor2345@gmail.com> | 2016-11-02 14:11:26 +1100 |
commit | 2f48693663c3703e1015fd438fc585cd2857ba71 (patch) | |
tree | e7fc8bef5f78a60734507b65d25d7618c0ba4e4e /src/or | |
parent | a906ff88a3660ff689a2bd630836b74d70a1ce6c (diff) | |
download | tor-2f48693663c3703e1015fd438fc585cd2857ba71.tar.gz tor-2f48693663c3703e1015fd438fc585cd2857ba71.zip |
Improve comments in check_private_dir and onion poisoning
Comment changes only
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/rendservice.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 6743d825b5..7dbcf718f7 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -998,7 +998,9 @@ service_is_single_onion_poisoned(const rend_service_t *service) fstatus = file_status(poison_fname); tor_free(poison_fname); - /* If this fname is occupied, the hidden service has been poisoned. */ + /* If this fname is occupied, the hidden service has been poisoned. + * fstatus can be FN_ERROR if the service directory does not exist, in that + * case, there is obviously no private key. */ if (fstatus == FN_FILE || fstatus == FN_EMPTY) { return 1; } @@ -1014,7 +1016,9 @@ rend_service_private_key_exists(const rend_service_t *service) char *private_key_path = rend_service_path(service, private_key_fname); const file_status_t private_key_status = file_status(private_key_path); tor_free(private_key_path); - /* Only non-empty regular private key files could have been used before. */ + /* Only non-empty regular private key files could have been used before. + * fstatus can be FN_ERROR if the service directory does not exist, in that + * case, there is obviously no private key. */ return private_key_status == FN_FILE; } |