useradm.c - possible bug
12 Mar
2012
12 Mar
'12
2:22 p.m.
Hello,
In Xymon 4.3.7 the useradm.c file around line 126 shows:
================================ cmd = (char *)malloc(1024 + strlen(passfile) + strlen(adduser_name) + strlen(adduser_password)); sprintf(cmd, "htpasswd -b '%s' '%s' '%s'", passfile, adduser_name, adduser_password); n = system(cmd); n = system(cmd); ret = WEXITSTATUS(n);
Just wondering why 'n = system(cmd)' is run twice?
John.
-- John Horne Tel: +44 (0)1752 587287 Plymouth University, UK Fax: +44 (0)1752 587001
11 Apr
11 Apr
8:46 p.m.
On 12-03-2012 15:22, John Horne wrote:
Hello,
In Xymon 4.3.7 the useradm.c file around line 126 shows:
================================ cmd = (char *)malloc(1024 + strlen(passfile) + strlen(adduser_name) + strlen(adduser_password)); sprintf(cmd, "htpasswd -b '%s' '%s' '%s'", passfile, adduser_name, adduser_password); n = system(cmd); n = system(cmd); ret = WEXITSTATUS(n);
Just wondering why 'n = system(cmd)' is run twice?
Why indeed ... cannot see how that makes sense. Deleted the extra call.
Thanks, Henrik
5248
Age (days ago)
5278
Last active (days ago)
1 comments
2 participants
participants (2)
-
henrik@hswn.dk
-
john.horne@plymouth.ac.uk