mirror of https://github.com/neutrinolabs/xrdp
remove g_set_file_rights since g_file_open sets the bits right
This commit is contained in:
parent
23ffdb0c5f
commit
d9ba6c30ca
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue