소스 검색

Fixed root usercheck not printing warning if file is suid-root.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15482 54d463be-8e91-2dee-dedb-b68131a5f0ec
gepard1984 13 년 전
부모
커밋
75b2081c6b
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/common/core.c

+ 2 - 2
src/common/core.c

@@ -210,11 +210,11 @@ static void display_title(void)
 	ShowInfo("SVN Revision: '"CL_WHITE"%s"CL_RESET"'.\n", get_svn_revision());
 }
 
-// Warning if logged in as superuser (root)
+// Warning if executed as superuser (root)
 void usercheck(void)
 {
 #ifndef _WIN32
-    if ((getuid() == 0) && (getgid() == 0)) {
+    if (geteuid() == 0) {
 		ShowWarning ("You are running rAthena with root privileges, it is not necessary.\n");
     }
 #endif