X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Futil.h;h=117855de819933fc173e6e9d9e7073ea00bb8501;hb=2d5bdf5bc0e4714d42e5999a4e37553a6bf83575;hp=d6d746bc6a506386b7a33f1902f07756a8356d78;hpb=2c3d81d4a7e3888632537140aae57940159fb39e;p=elogind.git diff --git a/src/shared/util.h b/src/shared/util.h index d6d746bc6..117855de8 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -272,6 +272,7 @@ int make_stdio(int fd); int make_null_stdio(void); int make_console_stdio(void); +int dev_urandom(void *p, size_t n); void random_bytes(void *p, size_t n); static inline uint64_t random_u64(void) { @@ -849,3 +850,8 @@ bool pid_valid(pid_t pid); int getpeercred(int fd, struct ucred *ucred); int getpeersec(int fd, char **ret); + +int writev_safe(int fd, const struct iovec *w, int j); + +int mkostemp_safe(char *pattern, int flags); +int open_tmpfile(const char *path, int flags);