84b40e3 Bug 593392 - setup-ds-admin.pl -k creates world readable file

Authored and Committed by rmeggins 13 years ago
    Bug 593392 - setup-ds-admin.pl -k creates world readable file
    
    https://bugzilla.redhat.com/show_bug.cgi?id=593392
    Resolves: bug 593392
    Bug Description: setup-ds-admin.pl -k creates world readable file
    Reviewed by: thoger (Thanks!)
    Branch: Directory_Server_8_2_Branch
    Fix Description: Use umask to make sure we create a .inf file that is
    only viewable by the user.  In addition, only create the temp file and
    filename when necessary.  In some places, the code was creating a .inf
    file on disk when it could just create one in memory.  The code should
    check to see if the Inf object has a file associated with it before
    attemtping to unlink it.  Make sure we do not unlink a .inf file given
    with -f on the command line.  If the user specified -k, always write to
    a temp file using __temp__ as the keyword to tell Inf->write to generate
    a temp file.
    Platforms tested: RHEL5 x86_64
    Flag Day: no
    Doc impact: no
    (cherry picked from commit 8e6e74009c80a7032308657e71450cb5aed9483c)
    
        
file modified
+40 -13