From d9ba6c30ca0044de8663e46c4de2467d049f18e8 Mon Sep 17 00:00:00 2001 From: jsorg71 Date: Tue, 19 May 2009 05:04:24 +0000 Subject: [PATCH] remove g_set_file_rights since g_file_open sets the bits right --- common/os_calls.c | 17 ----------------- common/os_calls.h | 2 -- sesman/env.c | 1 - xrdp/xrdp.c | 1 - 4 files changed, 21 deletions(-) diff --git a/common/os_calls.c b/common/os_calls.c index 2a2184b7..ba9ec4b8 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -1086,23 +1086,6 @@ g_file_lock(int fd, int start, int len) #endif } -/*****************************************************************************/ -/* returns error, always zero */ -int APP_CC -g_set_file_rights(const char* filename, int read, int write) -{ -#if defined(_WIN32) - return 0; -#else - int flags; - - flags = read ? S_IRUSR : 0; - flags |= write ? S_IWUSR : 0; - chmod(filename, flags); - return 0; -#endif -} - /*****************************************************************************/ /* returns error */ int APP_CC diff --git a/common/os_calls.h b/common/os_calls.h index 751734fd..5f84694d 100644 --- a/common/os_calls.h +++ b/common/os_calls.h @@ -129,8 +129,6 @@ g_file_seek(int fd, int offset); int APP_CC g_file_lock(int fd, int start, int len); int APP_CC -g_set_file_rights(const char* filename, int read, int write); -int APP_CC g_chmod_hex(const char* filename, int flags); int APP_CC g_mkdir(const char* dirname); diff --git a/sesman/env.c b/sesman/env.c index 066277d7..d9c35dba 100644 --- a/sesman/env.c +++ b/sesman/env.c @@ -54,7 +54,6 @@ env_check_password_file(char* filename, char* password) } g_file_write(fd, encryptedPasswd, 8); g_file_close(fd); - g_set_file_rights(filename, 1, 1); /* set read and write flags */ return 0; } diff --git a/xrdp/xrdp.c b/xrdp/xrdp.c index cb43321d..66654121 100644 --- a/xrdp/xrdp.c +++ b/xrdp/xrdp.c @@ -559,7 +559,6 @@ main(int argc, char** argv) } else { - g_set_file_rights(pid_file, 1, 1); /* xrdp.pid */ g_sprintf(text, "%d", pid); g_file_write(fd, text, g_strlen(text)); g_file_close(fd);