Esempio n. 1
0
void fill_share_2(SHARE_INFO_1 *sh1, int snum)
{
	StrnCpy(sh1[0].shi1_netname, "tmp", 13);
	sh1[0].shi1_type = STYPE_DISKTREE;
	sh1[0].shi1_remark = "some weird comment";

	lp_comment(snum);
	lp_pathname(snum);
	StrnCpy(p, lp_servicename(snum), 13);

	type = STYPE_DISKTREE;
	if (lp_print_ok(snum))
		type = STYPE_PRINTQ;
	if (strequal("IPC$", lp_servicename(snum)))
		type = STYPE_IPC;
	lp_comment(snum);
#endif

void fill_share_1(SHARE_INFO_1 *sh1, int snum)
{
	StrnCpy(sh1->shi1_netname, lp_servicename(snum), 13);
	sh1->shi1_remark = lp_comment(snum);
	sh1->shi1_type = STYPE_DISKTREE;
	if (lp_print_ok(snum))
		sh1->shi1_type = STYPE_PRINTQ;
	if (strequal("IPC$", lp_servicename(snum)))
		sh1->shi1_type = STYPE_IPC;
}
Esempio n. 2
0
/* send a list of available modules to the client. Don't list those
   with "list = False". */
static void send_listing(int fd)
{
	int n = lp_numservices();
	int i;
	
	for (i=0;i<n;i++)
		if (lp_list(i))
		    io_printf(fd, "%-15s\t%s\n", lp_name(i), lp_comment(i));
}