static int real_open(const char *path, int flags, mode_t mode, int undersc, int is64, int creat) { int res; is64 = is64; /* Possibly unused arg */ if(creat) { #ifdef HAVE_CREAT64 if(is64) res = real_creat64(path, mode, undersc); else #endif res = real_creat32(path, mode, undersc); } else { #ifdef HAVE_OPEN64 if(is64) res = real_open64(path, flags, mode, undersc); else #endif res = real_open32(path, flags, mode, undersc); } return res; }
int creat64(const char *pathname, mode_t mode) { DBG("pathname=%s, mode=%d\n", pathname, mode); if (check_perm(pathname, RESTRICTED_ALLOW_OPEN_WRITE_ENV, &patterns_open_write)) return -1; return real_creat64(pathname, mode); }