2
2
Display what we think the permissions of systems are.
4
Copyright (C) 1991, 1992, 1993, 1994, 1995 Ian Lance Taylor
4
Copyright (C) 1991, 1992, 1993, 1994, 1995, 2002 Ian Lance Taylor
6
6
This file is part of the Taylor UUCP package.
18
18
You should have received a copy of the GNU General Public License
19
19
along with this program; if not, write to the Free Software
20
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
22
The author of the program may be contacted at ian@airs.com or
23
c/o Cygnus Support, 48 Grove Street, Somerville, MA 02144.
22
The author of the program may be contacted at ian@airs.com.
29
const char uuchk_rcsid[] = "$Id: uuchk.c,v 1.65 1995/07/18 00:59:30 ian Rel $";
28
const char uuchk_rcsid[] = "$Id: uuchk.c,v 1.71 2002/03/05 19:10:42 ian Rel $";
32
31
#include "getopt.h"
38
37
static void ukusage P((void));
39
38
static void ukhelp P((void));
39
static void ukshow_names P((const char *zheader, const char * const *pznames));
40
40
static void ukshow P((const struct uuconf_system *qsys,
42
42
static int ikshow_port P((struct uuconf_port *qport, pointer pinfo));
115
115
/* Print version and exit. */
116
printf ("%s: Taylor UUCP %s, copyright (C) 1991, 92, 93, 94, 1995 Ian Lance Taylor\n",
116
printf ("uuchk (Taylor UUCP) %s\n", VERSION);
117
printf ("Copyright (C) 1991, 92, 93, 94, 1995, 2002 Ian Lance Taylor\n");
118
printf ("This program is free software; you may redistribute it under the terms of\n");
119
printf ("the GNU General Public LIcense. This program has ABSOLUTELY NO WARRANTY.\n");
118
120
exit (EXIT_SUCCESS);
167
struct uuconf_config_file_names snames;
165
168
const char *zstr;
167
170
char **pzsystems;
172
iret = uuconf_config_files (puuconf, &snames);
173
if (iret != UUCONF_SUCCESS)
174
ukuuconf_error (puuconf, iret);
175
if (snames.uuconf_ztaylor_config != NULL)
176
printf ("config file: %s\n", snames.uuconf_ztaylor_config);
177
ukshow_names("sys file", snames.uuconf_pztaylor_sys);
178
ukshow_names("port file", snames.uuconf_pztaylor_port);
179
ukshow_names("dial file", snames.uuconf_pztaylor_dial);
180
ukshow_names("dialcode file", snames.uuconf_pzdialcode);
181
ukshow_names("passwd file", snames.uuconf_pztaylor_pwd);
182
ukshow_names("call file", snames.uuconf_pztaylor_call);
184
if (snames.uuconf_zv2_systems != NULL)
185
printf ("V2 L.sys file: %s\n", snames.uuconf_zv2_systems);
186
if (snames.uuconf_zv2_device != NULL)
187
printf ("V2 L-devices file: %s\n", snames.uuconf_zv2_device);
188
if (snames.uuconf_zv2_userfile != NULL)
189
printf ("V2 USERFILE file: %s\n", snames.uuconf_zv2_userfile);
190
if (snames.uuconf_zv2_cmds != NULL)
191
printf ("V2 L.cmds file: %s\n", snames.uuconf_zv2_cmds);
193
ukshow_names("HDB Systems file", snames.uuconf_pzhdb_systems);
194
ukshow_names("HDB Devices file", snames.uuconf_pzhdb_devices);
195
ukshow_names("HDB Dialers file", snames.uuconf_pzhdb_dialers);
196
if (snames.uuconf_zhdb_permissions != NULL)
197
printf ("HDB Permissions file: %s\n", snames.uuconf_zhdb_permissions);
198
/* FIXME: This doesn't dump the following HDB file names:
199
Sysfiles, Maxuuxqts, remote.unknown. */
169
201
iret = uuconf_localname (puuconf, &zstr);
170
202
if (iret == UUCONF_SUCCESS)
171
203
printf ("Local node name %s\n", zstr);
295
printf ("Taylor UUCP %s, copyright (C) 1991, 92, 93, 94, 1995 Ian Lance Taylor\n",
327
printf ("Taylor UUCP %s, copyright (C) 1991, 92, 93, 94, 1995, 2002 Ian Lance Taylor\n",
297
329
printf ("Usage: %s [-s system] [-I file] [-v]\n", zKprogram);
298
330
printf (" -s,--system system: Only print configuration for named system\n");
299
331
printf (" -I,--config file: Set configuration file to use\n");
300
332
printf (" -v,--version: Print version and exit\n");
301
333
printf (" --help: Print help and exit\n");
334
printf ("Report bugs to taylor-uucp@gnu.org\n");
337
/* Print a list of configuration file names. */
339
ukshow_names (zheader, pznames)
341
const char * const *pznames;
345
if (pznames[1] == NULL)
346
printf ("%s: %s\n", zheader, pznames[0]);
349
const char * const *pz;
351
printf ("%s:\n", zheader);
352
for (pz = pznames; *pz != NULL; ++pz)
353
printf (" %s\n", *pz);
304
357
/* Dump out the information for a system. */
740
if (qsys->uuconf_cmax_file_time > 0)
741
printf (" Maximum file send time: %ld\n", qsys->uuconf_cmax_file_time);
687
743
if (qsys->uuconf_zprotocols != NULL)
688
744
printf (" Will use protocols %s\n", qsys->uuconf_zprotocols);
814
870
qtcp = &qport->uuconf_u.uuconf_stcp;
815
871
printf (" Port type tcp\n");
816
872
printf (" TCP service %s\n", qtcp->uuconf_zport);
873
if (qtcp->uuconf_iversion != 0)
874
printf (" IP version %d\n", qtcp->uuconf_iversion);
817
875
if (qtcp->uuconf_pzdialer != NULL
818
876
&& qtcp->uuconf_pzdialer[0] != NULL)