aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2007-08-30 01:06:54 +0000
committerBill Nottingham <notting@redhat.com>2007-08-30 01:06:54 +0000
commitd5342a9dc6215bf454109c777d65fdafcf92db4f (patch)
tree3c28f613af0d631a9b15ccee51f0966cbfcbd0b2
parent389faf0665ea54ffb857d0608abd382ff6163a69 (diff)
downloadinitscripts-d5342a9dc6215bf454109c777d65fdafcf92db4f.tar
initscripts-d5342a9dc6215bf454109c777d65fdafcf92db4f.tar.gz
initscripts-d5342a9dc6215bf454109c777d65fdafcf92db4f.tar.bz2
initscripts-d5342a9dc6215bf454109c777d65fdafcf92db4f.tar.xz
initscripts-d5342a9dc6215bf454109c777d65fdafcf92db4f.zip
fix open() call
-rw-r--r--ChangeLog2
-rw-r--r--initscripts.spec1
-rw-r--r--src/rename_device.c2
3 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 9c248440..c1dc0a6f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
* ChangeLog, initscripts.spec: 8.56-1
+ * src/rename_device.c: fix open() call
+
* rc.d/init.d/functions, rc.d/rc.sysinit:
optimize out some excess greps (<harald@redhat.com>)
diff --git a/initscripts.spec b/initscripts.spec
index 7176b00f..73c947a6 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -209,6 +209,7 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Wed Aug 29 2007 Bill Nottingham <notting@redhat.com> - 8.56-1
+- rename_device: fix open() call
- rc.sysinit: optimize out some excess greps (<harald@redhat.com>)
- halt: support newer nut syntax, conflict with old versions (#252973, <tsmetana@redhat.com>)
- fix buildreq from popt -> popt-devel
diff --git a/src/rename_device.c b/src/rename_device.c
index 0ec08b46..8fb06997 100644
--- a/src/rename_device.c
+++ b/src/rename_device.c
@@ -352,7 +352,7 @@ void take_lock() {
int lockfd;
while (1) {
- lockfd = open(LOCKFILE, O_RDWR|O_CREAT|O_EXCL);
+ lockfd = open(LOCKFILE, O_RDWR|O_CREAT|O_EXCL, 0644);
if (lockfd != -1) {
write(lockfd,"%d\n",getpid());
close(lockfd);