65 const char *filedesc);
66void file_unlock(
int fd,
const char *filename,
const char *filedesc);
void file_unlock(int fd, const char *filename, const char *filedesc)
Unlock a previously locked file.
Definition: file.c:140
bool file_is_exec(const char *filename)
Check whether a filename is executable.
Definition: file.c:45
void file_lock(int *lockfd, enum file_lock_flags flags, const char *filename, const char *filedesc)
Lock a file.
Definition: file.c:195
file_lock_flags
Definition: file.h:58
void file_copy_perms(const char *src, const char *dst)
Copy file ownership and permissions from one file to another.
Definition: file.c:65
void file_show(const char *filename)
Definition: file.c:234
bool file_is_locked(int lockfd, const char *filename)
Check if a file has a lock acquired.
Definition: file.c:170
int file_slurp(const char *filename, struct varbuf *vb, struct dpkg_error *err)
Definition: file.c:108
@ FILE_LOCK_WAIT
Definition: file.h:60
@ FILE_LOCK_NOWAIT
Definition: file.h:59
#define DPKG_BEGIN_DECLS
Definition: macros.h:86
#define DPKG_END_DECLS
Definition: macros.h:87
char * uname
Definition: file.h:47
gid_t gid
Definition: file.h:42
uid_t uid
Definition: file.h:41
char * gname
Definition: file.h:48
mode_t mode
Definition: file.h:43
varbuf_init must be called exactly once before the use of each varbuf (including before any call to v...
Definition: varbuf.h:55