Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use config_options.default_pass_length for ns_sendpassmail.c #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jesopo
Copy link
Member

@jesopo jesopo commented Jan 13, 2022

No description provided.

@aaronmdjones
Copy link
Member

aaronmdjones commented Jan 14, 2022

This option does not exist in version 7.2 of services; it needs some version detection logic.

diff --git a/src/ns_sendpassmail.c b/src/ns_sendpassmail.c
index d9e51d1..873448c 100644
--- a/src/ns_sendpassmail.c
+++ b/src/ns_sendpassmail.c
@@ -76,7 +76,11 @@ sendpassmail_foreach_cb(myentity_t *mt, void *privdata)
 		return 0;
 	}
 
+#if (CURRENT_ABI_REVISION < 730000)
 	key = random_string(12);
+#else
+	key = random_string(config_options.default_pass_length);
+#endif
 
 	const char *const hash = crypt_password(key);

(Edited to actually use random_string() >_>)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants