mirror of
https://github.com/bklang/ldap2dns.git
synced 2025-10-27 22:34:18 -04:00
* Fixed off-by-one when null-terminating password strings which could have led
to LDAP connection errors * Only print startup message when in daemon mode * Fix regex when computing the domain name of a FQDN (now properly supports FQDNs more than two levels deep) * Create baseDN when converting data to ldif git-svn-id: https://svn.alkaloid.net/gpl/ldap2dns/trunk@314 06cd67b6-e706-0410-b29e-9de616bca6e9
This commit is contained in:
@@ -339,7 +339,7 @@ static int parse_options()
|
||||
exit(0);
|
||||
case 'w':
|
||||
strncpy(options.password, optarg, sizeof(options.password));
|
||||
options.password[ sizeof( options.password ) ] = '\0';
|
||||
options.password[ sizeof( options.password ) -1 ] = '\0';
|
||||
memset(optarg, 'x', strlen(options.password));
|
||||
break;
|
||||
case 'e':
|
||||
@@ -1030,8 +1030,6 @@ int main(int argc, char** argv)
|
||||
main_argv = argv;
|
||||
parse_options();
|
||||
|
||||
fprintf(stdout, "ldap2dns v%s starting up", VERSION);
|
||||
|
||||
/* Initialization complete. If we're in daemon mode, fork and continue */
|
||||
if (options.is_daemon) {
|
||||
if (options.is_daemon==1 && fork()) {
|
||||
@@ -1039,6 +1037,8 @@ int main(int argc, char** argv)
|
||||
fprintf(stdout, "Sending process to background.");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
fprintf(stdout, "ldap2dns v%s starting up", VERSION);
|
||||
/* lowest priority */
|
||||
nice(19);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user