comparison mcabber/src/utils.c @ 816:a6628f0aabc1

Skip file permission checks on Cygwin
author Mikael Berthe <mikael@lilotux.net>
date Sat, 15 Apr 2006 15:55:01 +0200
parents 8f8d8f8157a2
children fe57dd753a56
comparison
equal deleted inserted replaced
815:04edcb6d7ee3 816:a6628f0aabc1
120 int checkset_perm(const char *name, unsigned int setmode) 120 int checkset_perm(const char *name, unsigned int setmode)
121 { 121 {
122 int fd; 122 int fd;
123 struct stat buf; 123 struct stat buf;
124 124
125 #ifdef __CYGWIN__
126 // Permission checking isn't efficent on Cygwin
127 return 0;
128 #endif
129
125 fd = lstat(name, &buf); 130 fd = lstat(name, &buf);
126 if (fd == -1) return -1; 131 if (fd == -1) return -1;
127 132
128 if (buf.st_uid != geteuid()) { 133 if (buf.st_uid != geteuid()) {
129 scr_LogPrint(LPRINT_LOGNORM, "Wrong file owner [%s]", name); 134 scr_LogPrint(LPRINT_LOGNORM, "Wrong file owner [%s]", name);