9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] auth trouble to sources
@ 2002-05-29 18:33 Russ Cox
  0 siblings, 0 replies; only message in thread
From: Russ Cox @ 2002-05-29 18:33 UTC (permalink / raw)
  To: 9fans

if you're having trouble authenticating,
this will help you figure out whether
the problem is ndb or your password.
if this program successfully connects,
then it's probably that your password
has been mangled/forgotten/etc.

g% cat x.c
#include <u.h>
#include <libc.h>
#include <bio.h>
#include <ndb.h>

void
main(void)
{
	int fd;
	char *addr;
	char server[Ndbvlen];
	Ndbtuple *nt;

	nt = csgetval("/net", "authdom", "outside.plan9.bell-labs.com", "auth", server);
	if(nt == nil){
		print("csgetval failed: %r\n");
		exits("csgetval");
	}
	print("auth %s\n", server);
	addr = netmkaddr(server, nil, "ticket");
	print("addr %s\n", addr);
	fd = dial(addr, 0, 0, 0);
	if(fd >= 0)
		print("connected\n");
	else
		print("dial failed: %r\n");
}
g% 8c x.c
g% 8l x.8
g% 8.out
auth sources.cs.bell-labs.com
addr net!sources.cs.bell-labs.com!ticket
connected
g%



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-05-29 18:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-29 18:33 [9fans] auth trouble to sources Russ Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).