Ejemplo n.º 1
0
Archivo: open.c Proyecto: lb1a/avfs
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;
}
Ejemplo n.º 2
0
Archivo: jail.c Proyecto: guoyu07/jff
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);
}