>Number:         144921
>Category:       bin
>Synopsis:       [patch] [pkg_install] Replace vsystem'ed call to mkdir(1) in 
>add/futil.c with mkdir(1)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 21 02:20:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Garrett Cooper
>Release:        9-CURRENT
>Organization:
Cisco Systems, Inc.
>Environment:
>Description:
There's no reason why we should expose the end-user to potential security 
issues in creating a subshell, or incur the unnecessary overhead of using 
mkdir(1) via vsystem when we can use mkdir(2) instead.
>How-To-Repeat:

>Fix:
See patch.

Patch attached with submission follows:

==== 
//depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/add/futil.c#1
 - 
/scratch/freebsd/perforce/pkg_install-enhancements/usr.sbin/pkg_install/add/futil.c
 ====
@@ -50,7 +50,7 @@
            }
        }
        else {
-           if (vsystem("/bin/mkdir %s", dir)) {
+           if (mkdir(dir, 0700) < 0) {
                if (cp2)
                    *cp2 = '/';
                return FAIL;


>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to