Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita6add72

Browse files
committed
In ipcclean, check LOGNAME only if USER is not set.
Fixes problem with 'su' on some platforms.
1 parent587bc81 commita6add72

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/bin/ipcclean/ipcclean.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22
#
3-
# $PostgreSQL: pgsql/src/bin/ipcclean/ipcclean.sh,v 1.16 2006/01/05 01:56:29 momjian Exp $
3+
# $PostgreSQL: pgsql/src/bin/ipcclean/ipcclean.sh,v 1.17 2006/03/03 16:49:21 momjian Exp $
44
#
55

66
CMDNAME=`basename$0`
@@ -19,7 +19,8 @@ if [ "$1" = '-?' -o "$1" = "--help" ]; then
1919
exit 0
2020
fi
2121

22-
if ["$USER"='root'-o"$LOGNAME"='root' ]
22+
# only check $LOGNAME if $USER is not set
23+
if ["$USER"='root'-o\(!"$USER"-a"$LOGNAME"='root'\) ]
2324
then
2425
(
2526
echo"$CMDNAME: cannot be run as root"1>&2

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp