#include "mkdir.h"
#include "path-util.h"
// #include "exit-status.h"
-// #include "hashmap.h"
+#include "hashmap.h"
+#include "set.h"
// #include "env-util.h"
#include "fileio.h"
// #include "device-nodes.h"
return -ERANGE;
if (!uid_is_valid(uid))
- return -ENXIO;
+ return -ENXIO; /* we return ENXIO instead of EINVAL
+ * here, to make it easy to distuingish
+ * invalid numeric uids invalid
+ * strings. */
if (ret_uid)
*ret_uid = uid;
a.st_ino == b.st_ino;
}
-/// UNNEEDED by elogind
-#if 0
int running_in_chroot(void) {
int ret;
return ret == 0;
}
-#endif // 0
static char *ascii_ellipsize_mem(const char *s, size_t old_length, size_t new_length, unsigned percent) {
size_t x;
return endswith(de->d_name, suffix);
}
-/// UNNEEDED by elogind
-#if 0
static int do_execute(char **directories, usec_t timeout, char *argv[]) {
_cleanup_hashmap_free_free_ Hashmap *pids = NULL;
_cleanup_set_free_free_ Set *seen = NULL;
wait_for_terminate_and_warn(name, executor_pid, true);
}
-#endif // 0
bool nulstr_contains(const char*nulstr, const char *needle) {
const char *i;
if (master < 0)
_exit(EXIT_FAILURE);
+ if (unlockpt(master) < 0)
+ _exit(EXIT_FAILURE);
+
cmsg = CMSG_FIRSTHDR(&mh);
cmsg->cmsg_level = SOL_SOCKET;
cmsg->cmsg_type = SCM_RIGHTS;