From 0f5200e6b58bf0b78fac4cbf43fc60611f8b944d Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Wed, 2 Oct 2002 18:42:01 +0000 Subject: make sure that the swap file is created 0600 (#74849) --- fsset.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fsset.py') diff --git a/fsset.py b/fsset.py index fc3dab595..c5109b8c6 100644 --- a/fsset.py +++ b/fsset.py @@ -1719,6 +1719,9 @@ class SwapFileDevice(Device): file = os.path.normpath(chroot + self.getDevice()) if not os.access(file, os.R_OK): if self.size: + # make sure the permissions are set properly + os.open(file, os.O_CREAT, 0600) + os.close(file) isys.ddfile(file, self.size, None) else: raise SystemError, (0, "swap file creation necessary, but " -- cgit