CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2016/03/30 11:03:06
Modified files:
usr.bin/rdistd : server.c
Log message:
The change to make mkstemp(3) require at least 6 trailing Xs broke
rdistd for directories that do not exist on the destination. Calling
mkstemp(3) twice with the same format (filled in by the first
mkstemp(3) call) is bogus so call chkparent() *before* mkstemp(3)
instead of only on error. This costs an extra lstat(2) in the case
where the directory already exists but simplifies the code and
doesn't rely on undefined behavior (namely, the state of the template
when mkstemp fails). OK tim@