diff options
author | 2002-06-18 14:50:26 +0000 | |
---|---|---|
committer | 2002-06-18 14:50:26 +0000 | |
commit | eec4d4aa29af66aceb7a1e9c3e6daf7f0038fb75 (patch) | |
tree | a58d9d1fc05abc6200ca4a08c5295b8102ecf3e9 | |
parent | unbreak sshd with privsep: open /dev/crypto, keep fd, and call (diff) | |
download | wireguard-openbsd-eec4d4aa29af66aceb7a1e9c3e6daf7f0038fb75.tar.xz wireguard-openbsd-eec4d4aa29af66aceb7a1e9c3e6daf7f0038fb75.zip |
make this example code 'secure' wrt shmget() perms; ok millert@
-rw-r--r-- | gnu/usr.bin/perl/eg/sysvipc/ipcshm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/usr.bin/perl/eg/sysvipc/ipcshm b/gnu/usr.bin/perl/eg/sysvipc/ipcshm index ecc1ba4366c..f7a2bbbb36b 100644 --- a/gnu/usr.bin/perl/eg/sysvipc/ipcshm +++ b/gnu/usr.bin/perl/eg/sysvipc/ipcshm @@ -12,7 +12,7 @@ die "usage: ipcshm {r|s}\n" unless $mode =~ /^[rs]$/; $send = ($mode eq "s"); $SIZE = 32; -$id = shmget(0x1234, $SIZE, ($send ? 0 : &IPC_CREAT) | 0644); +$id = shmget(0x1234, $SIZE, ($send ? 0 : &IPC_CREAT) | 0600); die "Can't get shared memory: $!\n" unless defined($id); print "shared memory id: $id\n"; |