[875] in Zephyr_Bugs

home help back first fref pref prev next nref lref last post

zrefresh

daemon@ATHENA.MIT.EDU (Derrick J Brashear)
Thu Jul 31 22:58:00 1997

Date: Thu, 31 Jul 1997 22:57:56 -0400 (EDT)
From: Derrick J Brashear <shadow@DEMENTIA.ORG>
Reply-To: Derrick J Brashear <shadow@DEMENTIA.ORG>
To: bug-zephyr@MIT.EDU

---559023410-851401618-870404276=:14736
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII

pursuant to the "bug" at the end of the zwgc man page here is a small program
to do just that which I had written for some never completed code in zwgc to
auto-refresh.

Enjoy

-D

---559023410-851401618-870404276=:14736
Content-Type: TEXT/plain; CHARSET=US-ASCII
Content-Description: zrefresh.c

#include <sysdep.h>
#include <zephyr/zephyr.h>
#include <com_err.h>

int
main(argc,argv)
	int argc;
	char *argv[];
{
	int retval, nsubs, one;
	short wgport;
	ZSubscription_t subs;

	if ((retval = ZInitialize()) != ZERR_NONE) {
	  com_err(argv[0],retval,"while initializing");
	  exit (1);
	}

 	if ((wgport = ZGetWGPort()) == -1) {
	  com_err(argv[0],errno,"while finding WindowGram port");
	  exit (1);
	} 
	
	retval = ZRetrieveSubscriptions((u_short)wgport,&nsubs);

	if (retval && retval != ZERR_TOOMANYSUBS) {
	  com_err(argv[0],errno,"while finding subscriptions");
	  exit (1);
	}

	if (nsubs < 1)
	  exit (0);

	one = 1;

	if ((retval = ZGetSubscriptions(&subs,&one)) != ZERR_NONE) {
	  com_err(argv[0],retval,"while getting subscription");
	  exit (1);
	}

	retval = ZSubscribeTo(&subs,1,(u_short)wgport);
	
	if (retval != ZERR_NONE) {
	  com_err(argv[0],retval,"while subscribing");
	  exit (1);
	}

	exit (0);
} 

---559023410-851401618-870404276=:14736
Content-Type: TEXT/plain; CHARSET=US-ASCII
Content-Description: zrefresh.1

.\"	/mit/zephyr/src/CVS/zephyr/clients/zrefresh/zrefresh.1,v
.\"	jtkohl
.\"	/mit/zephyr/src/CVS/zephyr/clients/zrefresh/zrefresh.1,v 1.10 1988/12/12 17:04:41 jtkohl Exp
.\"
.\" Copyright 1987,1988 by the Massachusetts Institute of Technology
.\" All rights reserved.  The file /usr/include/zephyr/mit-copyright.h
.\" specifies the terms and conditions for redistribution.
.\"
.\"
.TH ZREFRESH 1 "July 1, 1988" "MIT Project Athena"
.ds ]W MIT Project Athena
.SH NAME
zrefresh \- zephyr authentication refresher program
.SH SYNOPSIS
.B zrefresh
.SH DESCRIPTION
.I Zrefresh
is a zephyr authentication refresher program. 
It allows the user to continue getting authenticated messages after
renewing Kerberos credentials without restarting the 
.I Zephyr
client or
reloading subscriptions.
.PP
.I Zrefresh
takes no options, and returns 0 on success and 1 on failure.
.SH SEE ALSO
zephyr(1), zctl(1), zwgc(1), zephyrd(8)
.br
Project Athena Technical Plan Section E.4.1, `Zephyr Notification
Service'
.SH RESTRICTIONS
Copyright (c) 1987,1988 by the Massachusetts Institute of Technology.
All Rights Reserved.
.br
.I zephyr(1)
specifies the terms and conditions for redistribution.

---559023410-851401618-870404276=:14736--

home help back first fref pref prev next nref lref last post