/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1990-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* Glenn Fowler
* AT&T Research
*
* coded for bootstrap
*/
#include "cslib.h"
#include <wait.h>
#ifdef SIGCHLD
static int children;
static void
{
children++;
}
#endif
static int
{
pid_t n;
#ifdef SIGCHLD
children = 0;
#endif
av[2] = 0;
{
return -1;
}
#ifdef SIGCHLD
{
while (--children > 0)
}
#endif
/*
* yuk: looks like we have to give fdp services time
* to start up -- a few seconds shouldn't hurt
*/
sleep(2);
return n;
}
int
{
register char* s;
register char* p;
register char* t;
register char* v;
int fd;
int n;
#endif
/*
* validate the path
*/
p = (char*)path;
{
goto sorry;
}
p += sizeof(DEVLOCAL) - 1;
for (t = p; *t && *t != '/'; t++);
{
goto sorry;
}
/*
* locate the service
*/
s = cmd;
for (v = p; p <= t; *s++ = *p++);
t = s - 1;
for (p = v; p <= t; *s++ = *p++);
for (p = CS_SVC_SUFFIX; *s++ = *p++;);
p = pathbin();
for (;;)
{
if (!p)
{
goto sorry;
}
}
*t = 0;
sfsprintf(tmp, sizeof(tmp), "%s/fdp/%s/%s/%d-%d-/%c%s", csvar(state, CS_VAR_LOCAL, 0), csname(state, 0), cmd, st.st_uid, geteuid(), CS_MNT_STREAM, CS_MNT_TAIL);
#if CS_LIB_STREAM || CS_LIB_V10
{
return -1;
}
{
return -1;
}
return fd;
#else
#if CS_LIB_SOCKET_UN
{
int namlen;
struct sockaddr_un nam;
n = 0;
fd = -1;
for (;;)
{
{
return -1;
}
{
else
#endif
return fd;
fd = -1;
#endif
}
{
return -1;
}
n = 1;
}
}
#endif
#endif
return -1;
}
int
{
}