Ticket #66 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

conf_tmp_file and conf_tmp_dir don't interact with conf_cleanExit

Reported by: blee Owned by: blee
Priority: critical Milestone: confman-1.9.3
Component: confman Version: 1.9.2b
Keywords: Cc:

Description

Sep 23 16:25:01 kern1 confsync[49748]: root: Could not fetch the export.
Sep 23 16:30:01 kern1 confsync[49791]: root: scp: /var/db/confexport/export/kern1.lab2.tgz: No such file or directory

confaudit probably has this problem too.

Change History

comment:1 Changed 2 years ago by blee

  • Owner changed from confman-developers@… to blee
  • Status changed from new to accepted

comment:2 Changed 2 years ago by blee

The interaction among conf_tmp_dir, $TMPFILES, and conf_cleanExit is not working as expected.

comment:3 Changed 2 years ago by blee

  • Component changed from confsync to confman
  • Summary changed from confsync tmp file leak when export fetch fails to conf_tmp_file and conf_tmp_dir don't interact with conf_cleanExit

Renaming summary to be more descriptive. This is a general problem that extends beyond confsync.

Subshells can't write to their parent's variables in a way that is visible to the parent, so conf_cleanExit always has an empty TMPFILES and the result is tmp file leaks.

comment:4 Changed 2 years ago by blee

(In [437]) Re-architect the way tmpfiles are created. All processes automatically
create a base temporary directory under which all subsequent tmpdirs and
tmpfiles are created. An EXIT trap is set to call conf_cleanExit in
confmancommon.sh, instead of every executable. Clean exits are now
performed by calling conf_cleanExit.

See #66

comment:5 Changed 2 years ago by blee

  • Status changed from accepted to closed
  • Resolution set to fixed

(In [459]) Merge from trunk new temporary file architecture. Plugs multiple leaks.

Fixes #66

Note: See TracTickets for help on using tickets.