[Xymon] useradm.c - possible bug

John Horne john.horne at plymouth.ac.uk
Mon Mar 12 15:22:43 CET 2012


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



More information about the Xymon mailing list