xref: /titanic_44/usr/src/cmd/krb5/kadmin/cli/kadmin_ct.c (revision 56a424cca6b3f91f31bdab72a4626c48c779fe8b)
17c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
27c478bd9Sstevel@tonic-gate 
37c478bd9Sstevel@tonic-gate /*
47c478bd9Sstevel@tonic-gate  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
57c478bd9Sstevel@tonic-gate  *
67c478bd9Sstevel@tonic-gate  *	Openvision retains the copyright to derivative works of
77c478bd9Sstevel@tonic-gate  *	this source code.  Do *NOT* create a derivative of this
87c478bd9Sstevel@tonic-gate  *	source code before consulting with your legal department.
97c478bd9Sstevel@tonic-gate  *	Do *NOT* integrate *ANY* of this source code into another
107c478bd9Sstevel@tonic-gate  *	product before consulting with your legal department.
117c478bd9Sstevel@tonic-gate  *
127c478bd9Sstevel@tonic-gate  *	For further information, read the top-level Openvision
137c478bd9Sstevel@tonic-gate  *	copyright which is contained in the top-level MIT Kerberos
147c478bd9Sstevel@tonic-gate  *	copyright.
157c478bd9Sstevel@tonic-gate  *
167c478bd9Sstevel@tonic-gate  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
177c478bd9Sstevel@tonic-gate  *
187c478bd9Sstevel@tonic-gate  */
197c478bd9Sstevel@tonic-gate 
207c478bd9Sstevel@tonic-gate 
217c478bd9Sstevel@tonic-gate 
227c478bd9Sstevel@tonic-gate /* kadmin_ct.c - automatically generated from kadmin_ct.ct */
237c478bd9Sstevel@tonic-gate /* Above no longer appears to be true */
247c478bd9Sstevel@tonic-gate 
257c478bd9Sstevel@tonic-gate /*
267c478bd9Sstevel@tonic-gate  * I18n hack. We sill define gettext(s) to be s here. That way the info_strings
277c478bd9Sstevel@tonic-gate  * will be extracted to the .po file.
287c478bd9Sstevel@tonic-gate  */
297c478bd9Sstevel@tonic-gate 
307c478bd9Sstevel@tonic-gate #define	gettext(s) s
317c478bd9Sstevel@tonic-gate 
327c478bd9Sstevel@tonic-gate #include <ss/ss.h>
337c478bd9Sstevel@tonic-gate 
347c478bd9Sstevel@tonic-gate #ifndef __STDC__
357c478bd9Sstevel@tonic-gate #define const
367c478bd9Sstevel@tonic-gate #endif
377c478bd9Sstevel@tonic-gate 
387c478bd9Sstevel@tonic-gate static char const * const ssu00001[] = {
397c478bd9Sstevel@tonic-gate "add_principal",
407c478bd9Sstevel@tonic-gate     "addprinc",
417c478bd9Sstevel@tonic-gate     "ank",
427c478bd9Sstevel@tonic-gate     (char const *)0
437c478bd9Sstevel@tonic-gate };
447c478bd9Sstevel@tonic-gate extern void kadmin_addprinc __SS_PROTO;
457c478bd9Sstevel@tonic-gate static char const * const ssu00002[] = {
467c478bd9Sstevel@tonic-gate "delete_principal",
477c478bd9Sstevel@tonic-gate     "delprinc",
487c478bd9Sstevel@tonic-gate     (char const *)0
497c478bd9Sstevel@tonic-gate };
507c478bd9Sstevel@tonic-gate extern void kadmin_delprinc __SS_PROTO;
517c478bd9Sstevel@tonic-gate static char const * const ssu00003[] = {
527c478bd9Sstevel@tonic-gate "modify_principal",
537c478bd9Sstevel@tonic-gate     "modprinc",
547c478bd9Sstevel@tonic-gate     (char const *)0
557c478bd9Sstevel@tonic-gate };
567c478bd9Sstevel@tonic-gate extern void kadmin_modprinc __SS_PROTO;
577c478bd9Sstevel@tonic-gate static char const * const ssu00004[] = {
587c478bd9Sstevel@tonic-gate "change_password",
597c478bd9Sstevel@tonic-gate     "cpw",
607c478bd9Sstevel@tonic-gate     (char const *)0
617c478bd9Sstevel@tonic-gate };
627c478bd9Sstevel@tonic-gate extern void kadmin_cpw __SS_PROTO;
637c478bd9Sstevel@tonic-gate static char const * const ssu00005[] = {
647c478bd9Sstevel@tonic-gate "get_principal",
657c478bd9Sstevel@tonic-gate     "getprinc",
667c478bd9Sstevel@tonic-gate     (char const *)0
677c478bd9Sstevel@tonic-gate };
687c478bd9Sstevel@tonic-gate extern void kadmin_getprinc __SS_PROTO;
697c478bd9Sstevel@tonic-gate static char const * const ssu00006[] = {
707c478bd9Sstevel@tonic-gate "list_principals",
717c478bd9Sstevel@tonic-gate     "listprincs",
727c478bd9Sstevel@tonic-gate     "get_principals",
737c478bd9Sstevel@tonic-gate     "getprincs",
747c478bd9Sstevel@tonic-gate     (char const *)0
757c478bd9Sstevel@tonic-gate };
767c478bd9Sstevel@tonic-gate extern void kadmin_getprincs __SS_PROTO;
777c478bd9Sstevel@tonic-gate static char const * const ssu00007[] = {
787c478bd9Sstevel@tonic-gate "add_policy",
797c478bd9Sstevel@tonic-gate     "addpol",
807c478bd9Sstevel@tonic-gate     (char const *)0
817c478bd9Sstevel@tonic-gate };
827c478bd9Sstevel@tonic-gate extern void kadmin_addpol __SS_PROTO;
837c478bd9Sstevel@tonic-gate static char const * const ssu00008[] = {
847c478bd9Sstevel@tonic-gate "modify_policy",
857c478bd9Sstevel@tonic-gate     "modpol",
867c478bd9Sstevel@tonic-gate     (char const *)0
877c478bd9Sstevel@tonic-gate };
887c478bd9Sstevel@tonic-gate extern void kadmin_modpol __SS_PROTO;
897c478bd9Sstevel@tonic-gate static char const * const ssu00009[] = {
907c478bd9Sstevel@tonic-gate "delete_policy",
917c478bd9Sstevel@tonic-gate     "delpol",
927c478bd9Sstevel@tonic-gate     (char const *)0
937c478bd9Sstevel@tonic-gate };
947c478bd9Sstevel@tonic-gate extern void kadmin_delpol __SS_PROTO;
957c478bd9Sstevel@tonic-gate static char const * const ssu00010[] = {
967c478bd9Sstevel@tonic-gate "get_policy",
977c478bd9Sstevel@tonic-gate     "getpol",
987c478bd9Sstevel@tonic-gate     (char const *)0
997c478bd9Sstevel@tonic-gate };
1007c478bd9Sstevel@tonic-gate extern void kadmin_getpol __SS_PROTO;
1017c478bd9Sstevel@tonic-gate static char const * const ssu00011[] = {
1027c478bd9Sstevel@tonic-gate "list_policies",
1037c478bd9Sstevel@tonic-gate     "listpols",
1047c478bd9Sstevel@tonic-gate     "get_policies",
1057c478bd9Sstevel@tonic-gate     "getpols",
1067c478bd9Sstevel@tonic-gate     (char const *)0
1077c478bd9Sstevel@tonic-gate };
1087c478bd9Sstevel@tonic-gate extern void kadmin_getpols __SS_PROTO;
1097c478bd9Sstevel@tonic-gate static char const * const ssu00012[] = {
1107c478bd9Sstevel@tonic-gate "get_privs",
1117c478bd9Sstevel@tonic-gate     "getprivs",
1127c478bd9Sstevel@tonic-gate     (char const *)0
1137c478bd9Sstevel@tonic-gate };
1147c478bd9Sstevel@tonic-gate extern void kadmin_getprivs __SS_PROTO;
1157c478bd9Sstevel@tonic-gate static char const * const ssu00013[] = {
1167c478bd9Sstevel@tonic-gate "ktadd",
1177c478bd9Sstevel@tonic-gate     "xst",
1187c478bd9Sstevel@tonic-gate     (char const *)0
1197c478bd9Sstevel@tonic-gate };
1207c478bd9Sstevel@tonic-gate extern void kadmin_keytab_add __SS_PROTO;
1217c478bd9Sstevel@tonic-gate static char const * const ssu00014[] = {
1227c478bd9Sstevel@tonic-gate "ktremove",
1237c478bd9Sstevel@tonic-gate     "ktrem",
1247c478bd9Sstevel@tonic-gate     (char const *)0
1257c478bd9Sstevel@tonic-gate };
1267c478bd9Sstevel@tonic-gate extern void kadmin_keytab_remove __SS_PROTO;
127*56a424ccSmp153739 
1287c478bd9Sstevel@tonic-gate static char const * const ssu00015[] = {
129*56a424ccSmp153739 "lock",
130*56a424ccSmp153739     (char const *)0
131*56a424ccSmp153739 };
132*56a424ccSmp153739 extern void kadmin_lock __SS_PROTO;
133*56a424ccSmp153739 static char const * const ssu00016[] = {
134*56a424ccSmp153739 "unlock",
135*56a424ccSmp153739     (char const *)0
136*56a424ccSmp153739 };
137*56a424ccSmp153739 extern void kadmin_unlock __SS_PROTO;
138*56a424ccSmp153739 
139*56a424ccSmp153739 static char const * const ssu00017[] = {
1407c478bd9Sstevel@tonic-gate "list_requests",
1417c478bd9Sstevel@tonic-gate     "lr",
1427c478bd9Sstevel@tonic-gate     "?",
1437c478bd9Sstevel@tonic-gate     (char const *)0
1447c478bd9Sstevel@tonic-gate };
145*56a424ccSmp153739 
1467c478bd9Sstevel@tonic-gate extern void ss_list_requests __SS_PROTO;
147*56a424ccSmp153739 static char const * const ssu00018[] = {
1487c478bd9Sstevel@tonic-gate "quit",
1497c478bd9Sstevel@tonic-gate     "exit",
1507c478bd9Sstevel@tonic-gate     "q",
1517c478bd9Sstevel@tonic-gate     (char const *)0
1527c478bd9Sstevel@tonic-gate };
1537c478bd9Sstevel@tonic-gate extern void ss_quit __SS_PROTO;
154*56a424ccSmp153739 static ss_request_entry ssu00019[] = {
1557c478bd9Sstevel@tonic-gate     { ssu00001,
1567c478bd9Sstevel@tonic-gate       kadmin_addprinc,
1577c478bd9Sstevel@tonic-gate       gettext("Add principal"),
1587c478bd9Sstevel@tonic-gate       0 },
1597c478bd9Sstevel@tonic-gate     { ssu00002,
1607c478bd9Sstevel@tonic-gate       kadmin_delprinc,
1617c478bd9Sstevel@tonic-gate       gettext("Delete principal"),
1627c478bd9Sstevel@tonic-gate       0 },
1637c478bd9Sstevel@tonic-gate     { ssu00003,
1647c478bd9Sstevel@tonic-gate       kadmin_modprinc,
1657c478bd9Sstevel@tonic-gate       gettext("Modify principal"),
1667c478bd9Sstevel@tonic-gate       0 },
1677c478bd9Sstevel@tonic-gate     { ssu00004,
1687c478bd9Sstevel@tonic-gate       kadmin_cpw,
1697c478bd9Sstevel@tonic-gate       gettext("Change password"),
1707c478bd9Sstevel@tonic-gate       0 },
1717c478bd9Sstevel@tonic-gate     { ssu00005,
1727c478bd9Sstevel@tonic-gate       kadmin_getprinc,
1737c478bd9Sstevel@tonic-gate       gettext("Get principal"),
1747c478bd9Sstevel@tonic-gate       0 },
1757c478bd9Sstevel@tonic-gate     { ssu00006,
1767c478bd9Sstevel@tonic-gate       kadmin_getprincs,
1777c478bd9Sstevel@tonic-gate       gettext("List principals"),
1787c478bd9Sstevel@tonic-gate       0 },
1797c478bd9Sstevel@tonic-gate     { ssu00007,
1807c478bd9Sstevel@tonic-gate       kadmin_addpol,
1817c478bd9Sstevel@tonic-gate       gettext("Add policy"),
1827c478bd9Sstevel@tonic-gate       0 },
1837c478bd9Sstevel@tonic-gate     { ssu00008,
1847c478bd9Sstevel@tonic-gate       kadmin_modpol,
1857c478bd9Sstevel@tonic-gate       gettext("Modify policy"),
1867c478bd9Sstevel@tonic-gate       0 },
1877c478bd9Sstevel@tonic-gate     { ssu00009,
1887c478bd9Sstevel@tonic-gate       kadmin_delpol,
1897c478bd9Sstevel@tonic-gate       gettext("Delete policy"),
1907c478bd9Sstevel@tonic-gate       0 },
1917c478bd9Sstevel@tonic-gate     { ssu00010,
1927c478bd9Sstevel@tonic-gate       kadmin_getpol,
1937c478bd9Sstevel@tonic-gate       gettext("Get policy"),
1947c478bd9Sstevel@tonic-gate       0 },
1957c478bd9Sstevel@tonic-gate     { ssu00011,
1967c478bd9Sstevel@tonic-gate       kadmin_getpols,
1977c478bd9Sstevel@tonic-gate       gettext("List policies"),
1987c478bd9Sstevel@tonic-gate       0 },
1997c478bd9Sstevel@tonic-gate     { ssu00012,
2007c478bd9Sstevel@tonic-gate       kadmin_getprivs,
2017c478bd9Sstevel@tonic-gate       gettext("Get privileges"),
2027c478bd9Sstevel@tonic-gate       0 },
2037c478bd9Sstevel@tonic-gate     { ssu00013,
2047c478bd9Sstevel@tonic-gate       kadmin_keytab_add,
2057c478bd9Sstevel@tonic-gate       gettext("Add entry(s) to a keytab"),
2067c478bd9Sstevel@tonic-gate       0 },
2077c478bd9Sstevel@tonic-gate     { ssu00014,
2087c478bd9Sstevel@tonic-gate       kadmin_keytab_remove,
2097c478bd9Sstevel@tonic-gate       gettext("Remove entry(s) from a keytab"),
2107c478bd9Sstevel@tonic-gate       0 },
2117c478bd9Sstevel@tonic-gate     { ssu00015,
212*56a424ccSmp153739       kadmin_lock,
213*56a424ccSmp153739       gettext("Lock database exclusively (use with extreme caution!)"),
214*56a424ccSmp153739       0 },
215*56a424ccSmp153739     { ssu00016,
216*56a424ccSmp153739       kadmin_unlock,
217*56a424ccSmp153739       gettext("Release exclusive database lock"),
218*56a424ccSmp153739       0 },
219*56a424ccSmp153739     { ssu00017,
2207c478bd9Sstevel@tonic-gate       ss_list_requests,
2217c478bd9Sstevel@tonic-gate       gettext("List available requests."),
2227c478bd9Sstevel@tonic-gate       0 },
223*56a424ccSmp153739     { ssu00018,
2247c478bd9Sstevel@tonic-gate       ss_quit,
2257c478bd9Sstevel@tonic-gate       gettext("Exit program."),
2267c478bd9Sstevel@tonic-gate       0 },
2277c478bd9Sstevel@tonic-gate     { 0, 0, 0, 0 }
2287c478bd9Sstevel@tonic-gate };
2297c478bd9Sstevel@tonic-gate 
230*56a424ccSmp153739 ss_request_table kadmin_cmds = { 2, ssu00019 };
2317c478bd9Sstevel@tonic-gate 
2327c478bd9Sstevel@tonic-gate #undef gettext
233