Module Name:    src
Committed By:   agc
Date:           Wed Dec  1 22:14:52 UTC 2010

Modified Files:
        src/crypto/external/bsd/netpgp/dist/src/lib: netpgp.c

Log Message:
avoid nameclash - call the generated user id variable "generated userid"

also keep the time of structure initialisation as an internal variable.


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 \
    src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.86 src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.87
--- src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.86	Wed Dec  1 22:01:41 2010
+++ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c	Wed Dec  1 22:14:52 2010
@@ -34,7 +34,7 @@
 
 #if defined(__NetBSD__)
 __COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: netpgp.c,v 1.86 2010/12/01 22:01:41 agc Exp $");
+__RCSID("$NetBSD: netpgp.c,v 1.87 2010/12/01 22:14:52 agc Exp $");
 #endif
 
 #include <sys/types.h>
@@ -755,6 +755,7 @@
 netpgp_init(netpgp_t *netpgp)
 {
 	pgp_io_t	*io;
+	time_t		 t;
 	char		 id[MAX_ID_LENGTH];
 	char		*homedir;
 	char		*userid;
@@ -870,6 +871,8 @@
 			(void) netpgp_setvar(netpgp, "userid", userid);
 		}
 	}
+	t = time(NULL);
+	netpgp_setvar(netpgp, "initialised", ctime(&t));
 	return 1;
 }
 
@@ -1180,7 +1183,7 @@
 	(void) fprintf(stdout, "%s", cp);
 	/* write public key */
 	cc = snprintf(dir, sizeof(dir), "%s/%.16s", netpgp_getvar(netpgp, "homedir"), &cp[ID_OFFSET]);
-	netpgp_setvar(netpgp, "userid", &dir[cc - 16]);
+	netpgp_setvar(netpgp, "generated userid", &dir[cc - 16]);
 	if (mkdir(dir, 0700) < 0) {
 		(void) fprintf(io->errs, "can't mkdir '%s'\n", dir);
 		return 0;

Reply via email to