ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/gvpectrl.C
(Generate patch)

Comparing gvpe/src/gvpectrl.C (file contents):
Revision 1.24 by root, Thu Oct 25 03:13:13 2018 UTC vs.
Revision 1.25 by root, Thu Oct 6 03:03:09 2022 UTC

246 * generate public/private RSA keypairs for all hosts that don't have one. 246 * generate public/private RSA keypairs for all hosts that don't have one.
247 */ 247 */
248static int 248static int
249keygen (const char *pub, const char *priv) 249keygen (const char *pub, const char *priv)
250{ 250{
251 /* some libcs are buggy and require an extra seek to the end */
251 252
252 FILE *pubf = fopen (pub, "ab"); 253 FILE *pubf = fopen (pub, "ab");
253 if (!pubf || fseek (pubf, 0, SEEK_END)) 254 if (!pubf || fseek (pubf, 0, SEEK_END))
254 { 255 {
255 perror (pub); 256 perror (pub);
261 fclose (pubf); 262 fclose (pubf);
262 return 1; 263 return 1;
263 } 264 }
264 265
265 FILE *privf = fopen (priv, "ab"); 266 FILE *privf = fopen (priv, "ab");
266
267 /* some libcs are buggy and require an extra seek to the end */
268 if (!privf || fseek (privf, 0, SEEK_END)) 267 if (!privf || fseek (privf, 0, SEEK_END))
269 { 268 {
270 perror (priv); 269 perror (priv);
271 exit (EXIT_FAILURE); 270 exit (EXIT_FAILURE);
272 } 271 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines