Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 141335 | Differences between
and this patch

Collapse All | Expand All

(-)l2tpns-2.1.19-orig/cli.c (-1 / +10 lines)
Lines 290-298 Link Here
290
{
290
{
291
	int require_auth = 1;
291
	int require_auth = 1;
292
	struct sockaddr_in addr;
292
	struct sockaddr_in addr;
293
#if 0  /* Disabled by patch. */
293
	socklen_t l = sizeof(addr);
294
	socklen_t l = sizeof(addr);
295
#endif /* Disabled by patch. */
294
296
295
	if (fork_and_close()) return;
297
	if (fork_and_close()) return;
298
299
#if 0  /* Disabled by patch. */
296
	if (getpeername(sockfd, (struct sockaddr *) &addr, &l) == 0)
300
	if (getpeername(sockfd, (struct sockaddr *) &addr, &l) == 0)
297
	{
301
	{
298
		require_auth = addr.sin_addr.s_addr != inet_addr("127.0.0.1");
302
		require_auth = addr.sin_addr.s_addr != inet_addr("127.0.0.1");
Lines 304-321 Link Here
304
308
305
	if (require_auth)
309
	if (require_auth)
306
	{
310
	{
307
		LOG(3, 0, 0, "CLI is remote, requiring authentication\n");
311
#endif /* Disabled by patch. */
312
313
		LOG(3, 0, 0, "CLI always requires authentication due to patch.\n");
308
		if (!cli->users) /* paranoia */
314
		if (!cli->users) /* paranoia */
309
		{
315
		{
310
			LOG(0, 0, 0, "No users for remote authentication!  Exiting CLI\n");
316
			LOG(0, 0, 0, "No users for remote authentication!  Exiting CLI\n");
311
			exit(0);
317
			exit(0);
312
		}
318
		}
319
320
#if 0  /* Disabled by patch. */
313
	}
321
	}
314
	else
322
	else
315
	{
323
	{
316
		/* no username/pass required */
324
		/* no username/pass required */
317
		cli->users = 0;
325
		cli->users = 0;
318
	}
326
	}
327
#endif /* Disabled by patch. */
319
328
320
#ifdef RINGBUFFER
329
#ifdef RINGBUFFER
321
	debug_rb_tail = ringbuffer->tail;
330
	debug_rb_tail = ringbuffer->tail;

Return to bug 141335