[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdelibs/kinit
From: Dirk Mueller <mueller () kde ! org>
Date: 2008-09-10 11:49:54
Message-ID: 1221047394.347371.31755.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 859452 by mueller:
perform the uid check on a file that exists even with
Linux 2.4
M +2 -1 start_kdeinit.c
--- branches/KDE/3.5/kdelibs/kinit/start_kdeinit.c #859451:859452
@@ -44,7 +44,7 @@
{
char buf[ 1024 ];
int procfile;
- sprintf( buf, "/proc/%d/oom_adj", pid );
+ sprintf( buf, "/proc/%d/stat", pid );
if( !enable ) {
/* Be paranoid and check that the pid we got from the pipe
belongs to this user. */
@@ -52,6 +52,7 @@
if( lstat( buf, &st ) < 0 || st.st_uid != getuid())
return 0;
}
+ sprintf( buf, "/proc/%d/oom_adj", pid );
procfile = open( buf, O_WRONLY );
if( procfile >= 0 ) {
if( enable )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic