コード例 #1
0
ファイル: unixserv.C プロジェクト: bougyman/sfs
void
sfs_suidserv (str prog, suidservcb cb)
{
  str sock = strbuf ("%s/%s.sock", sfssockdir.cstr (), prog.cstr ());
  sfs_unixserv (sock, wrap (suidaccept_cb, cb), 0660);
  struct stat sb;
  if (lstat (sock.cstr (), &sb) < 0 || (sb.st_mode & S_IFMT) != S_IFSOCK)
    fatal << sock << ": bound but cannot stat\n";
  if (!runinplace && sb.st_gid != sfs_gid)
    chown (sock.cstr (), (uid_t) -1, sfs_gid);
}
コード例 #2
0
ファイル: sfsserv.C プロジェクト: gildafnai82/craq
void
sfssd_slavegen_axprt(str sock, sfsserv_axprt_cb cb)
{
  sfs_unixserv (sock, wrap (sfssd_slavegen_cb, cb));
}