diff options
author | Jeremy Katz <katzj@redhat.com> | 2006-08-24 20:16:54 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2006-08-24 20:16:54 +0000 |
commit | 0d67085632ee9bd64eabad776f208fa250fe4a84 (patch) | |
tree | 99e294c1a675454878a146ecf0b9e49fb5b3f81c /packages.py | |
parent | bafe7b1a8184a23a14efe35f083c2fcb190cdc24 (diff) | |
download | anaconda-0d67085632ee9bd64eabad776f208fa250fe4a84.tar.gz anaconda-0d67085632ee9bd64eabad776f208fa250fe4a84.tar.xz anaconda-0d67085632ee9bd64eabad776f208fa250fe4a84.zip |
2006-08-24 Jeremy Katz <katzj@redhat.com>
* fsset.py (FileSystemType.mount): Reset file context on
mountpoints (#202525)
* packages.py (setFileCons): Use new parameter to resetFileContext
* isys/isys.py (resetFileContext): Allow passing a rootpath
* isys/isys.c (doResetFileContext): Likewise.
Diffstat (limited to 'packages.py')
-rw-r--r-- | packages.py | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/packages.py b/packages.py index db0b2364c..0658e1f97 100644 --- a/packages.py +++ b/packages.py @@ -210,23 +210,13 @@ def setFileCons(anaconda): files.extend(map(addpath, dirfiles)) files.append(dir) - # blah, to work in a chroot, we need to actually be inside so the - # regexes will work - child = os.fork() - if (not child): - os.chroot(anaconda.rootPath) - for f in files: - if not os.access("%s" %(f,), os.R_OK): - log.warning("%s doesn't exist" %(f,)) - continue - ret = isys.resetFileContext(os.path.normpath(f)) - log.info("set fc of %s to %s" %(f, ret)) - os._exit(0) - - try: - os.waitpid(child, 0) - except OSError, (num, msg): - pass + for f in files: + if not os.access("%s" %(f,), os.R_OK): + log.warning("%s doesn't exist" %(f,)) + continue + ret = isys.resetFileContext(os.path.normpath(f), + anaconda.rootPath) + log.info("set fc of %s to %s" %(f, ret)) return |