File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,12 @@ const char * OsLogHandle::s_category = "main";
1515auto Identity::createDaemonUser (const sys_string & name) -> Identity {
1616
1717#if HAVE_USERADD
18- sys_string command = S (" useradd -r -d " WSDDN_DEFAULT_CHROOT_DIR " -s /bin/false '" ) + name + S (" '" );
18+ #ifdef __linux__
19+ sys_string command = S (" useradd -r -d " WSDDN_DEFAULT_CHROOT_DIR " -s /bin/false '" ) + name + S (" '" );
20+ #else
21+ sys_string command = S (" useradd -L daemon -g =uid -d " WSDDN_DEFAULT_CHROOT_DIR " -s /sbin/nologin '" ) + name + S (" '" );
22+ createMissingDirs (WSDDN_DEFAULT_CHROOT_DIR, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP, Identity::admin ());
23+ #endif
1924#elif HAVE_PW
2025 sys_string command = S (" pw adduser '" ) + name + S (" ' -d " WSDDN_DEFAULT_CHROOT_DIR " -s /bin/false -c \" WS-Discovery Daemon User\" " );
2126#endif
You can’t perform that action at this time.
0 commit comments