diff options
author | Chris Lumens <clumens@redhat.com> | 2007-11-13 15:12:21 -0500 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2007-11-13 15:12:21 -0500 |
commit | 784c13a7988e50fa24b562aefa68e16bb21221e0 (patch) | |
tree | 1f3279a502259dc5e5e7d9426a868db01944bd45 /livecd.py | |
parent | f99f262b8910fd7e7460e530f7ee75f915d9f91e (diff) | |
download | anaconda-784c13a7988e50fa24b562aefa68e16bb21221e0.tar.gz anaconda-784c13a7988e50fa24b562aefa68e16bb21221e0.tar.xz anaconda-784c13a7988e50fa24b562aefa68e16bb21221e0.zip |
Log errors when we can't chown files and continue (#376741).
This happens for any files that are owned by nfsnobody, as that UID maps to
-1 which will cause an overflow. So far this has only occurred on
/var/spool/mail/nfsnobody. Seems like fake users shouldn't have mail spools
created for them.
Diffstat (limited to 'livecd.py')
-rw-r--r-- | livecd.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -62,7 +62,11 @@ def copytree(src, dst, symlinks=False, preserveOwner=False, else: shutil.copyfile(srcname, dstname) if preserveOwner: - os.chown(dstname, os.stat(srcname)[stat.ST_UID], os.stat(srcname)[stat.ST_GID]) + try: + os.chown(dstname, os.stat(srcname)[stat.ST_UID], os.stat(srcname)[stat.ST_GID]) + except OverflowError: + log.error("Could not set owner and group on file %s" % dstname) + if preserveSelinux: selinux.lsetfilecon(dstname, selinux.lgetfilecon(srcname)[1]) shutil.copystat(srcname, dstname) |