/*
 * abstract Unix socket bind: trigger @ path2glob
 */

#include <string.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <unistd.h>

int main(void)
{
	int fd = socket(AF_UNIX, SOCK_STREAM, 0);
	if (fd < 0)
		return 1;

	struct sockaddr_un addr;
	memset(&addr, 0, sizeof(addr));
	addr.sun_family = AF_UNIX;
	addr.sun_path[0] = '\0';
	strncpy(addr.sun_path + 1, "pandora-test--12345", sizeof(addr.sun_path) - 2);
	socklen_t len = sizeof(sa_family_t) + 1 + strlen("pandora-test--12345");
	bind(fd, (struct sockaddr *)&addr, len);
	close(fd);
	return 0;
}
