bin/144920: [patch] [pkg_install] Remove useless chmod after
mkdtemp(3) call
Garrett Cooper
gcooper at FreeBSD.org
Sun Mar 21 01:50:02 UTC 2010
>Number: 144920
>Category: bin
>Synopsis: [patch] [pkg_install] Remove useless chmod after mkdtemp(3) call
>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 01:50:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Garrett Cooper
>Release: 9-CURRENT
>Organization:
Cisco Systems, Inc.
>Environment:
>Description:
There's a useless chmod(2) to 0700 after a mkdtemp(3) call in make_playpen in lib/pen.c. According to mkdtemp(3), this is automatically being done by default:
The mkdtemp() function makes the same replacement to the template as in
mktemp() and creates the template directory, mode 0700.
>How-To-Repeat:
>Fix:
See patch.
Patch attached with submission follows:
==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/lib/pen.c#1 - /scratch/freebsd/perforce/pkg_install-enhancements/usr.sbin/pkg_install/lib/pen.c ====
@@ -113,10 +113,6 @@
cleanup(0);
errx(2, "%s: can't mktemp '%s'", __func__, pen);
}
- if (chmod(pen, 0700) == FAIL) {
- cleanup(0);
- errx(2, "%s: can't mkdir '%s'", __func__, pen);
- }
if (Verbose) {
if (sz) {
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list