Fix --remove-source-files sanity check w/--copy-links the right way.
[rsync.git] / authenticate.c
index d60ee20b6b53a9351efbdf175f36525ead220de6..8534a0b2f576c1ef853b9a3b54877493e03eb794 100644 (file)
@@ -2,7 +2,7 @@
  * Support rsync daemon authentication.
  *
  * Copyright (C) 1998-2000 Andrew Tridgell
- * Copyright (C) 2002-2015 Wayne Davison
+ * Copyright (C) 2002-2018 Wayne Davison
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -162,8 +162,8 @@ static const char *check_secret(int module, const char *user, const char *group,
 
        fclose(fh);
 
-       memset(line, 0, sizeof line);
-       memset(pass2, 0, sizeof pass2);
+       force_memzero(line, sizeof line);
+       force_memzero(pass2, sizeof pass2);
 
        return err;
 }
@@ -318,8 +318,8 @@ char *auth_server(int f_in, int f_out, int module, const char *host,
                err = check_secret(module, line, group, challenge, pass);
        }
 
-       memset(challenge, 0, sizeof challenge);
-       memset(pass, 0, strlen(pass));
+       force_memzero(challenge, sizeof challenge);
+       force_memzero(pass, strlen(pass));
 
        if (auth_uid_groups) {
                int j;