Xymon Mailing List Archive search

useradm.c - possible bug

list Henrik Størner
Wed, 11 Apr 2012 22:46:55 +0200
Message-Id: <user-d0318037ff30@xymon.invalid>

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