1178825Sdfr/* 2233294Sstas * Copyright (c) 2004 Kungliga Tekniska H��gskolan 3178825Sdfr * (Royal Institute of Technology, Stockholm, Sweden). 4178825Sdfr * All rights reserved. 5178825Sdfr * 6178825Sdfr * Redistribution and use in source and binary forms, with or without 7178825Sdfr * modification, are permitted provided that the following conditions 8178825Sdfr * are met: 9178825Sdfr * 10178825Sdfr * 1. Redistributions of source code must retain the above copyright 11178825Sdfr * notice, this list of conditions and the following disclaimer. 12178825Sdfr * 13178825Sdfr * 2. Redistributions in binary form must reproduce the above copyright 14178825Sdfr * notice, this list of conditions and the following disclaimer in the 15178825Sdfr * documentation and/or other materials provided with the distribution. 16178825Sdfr * 17178825Sdfr * 3. Neither the name of the Institute nor the names of its contributors 18178825Sdfr * may be used to endorse or promote products derived from this software 19178825Sdfr * without specific prior written permission. 20178825Sdfr * 21178825Sdfr * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 22178825Sdfr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23178825Sdfr * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24178825Sdfr * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 25178825Sdfr * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26178825Sdfr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27178825Sdfr * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28178825Sdfr * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29178825Sdfr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30178825Sdfr * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31178825Sdfr * SUCH DAMAGE. 32178825Sdfr */ 33233294Sstas/* $Id$ */ 34178825Sdfr 35178825Sdfrcommand = { 36178825Sdfr name = "add" 37178825Sdfr option = { 38178825Sdfr long = "principal" 39178825Sdfr short = "p" 40178825Sdfr type = "string" 41178825Sdfr help = "principal to add" 42178825Sdfr argument = "principal" 43178825Sdfr default = "" 44178825Sdfr } 45178825Sdfr option = { 46178825Sdfr long = "kvno" 47178825Sdfr short = "V" 48178825Sdfr type = "integer" 49178825Sdfr help = "key version number" 50178825Sdfr default = "-1" 51178825Sdfr } 52178825Sdfr option = { 53178825Sdfr long = "enctype" 54178825Sdfr short = "e" 55178825Sdfr type = "string" 56178825Sdfr argument = "enctype" 57178825Sdfr help = "encryption type" 58178825Sdfr } 59178825Sdfr option = { 60178825Sdfr long = "password" 61178825Sdfr short = "w" 62178825Sdfr type = "string" 63178825Sdfr help = "password for key" 64178825Sdfr } 65178825Sdfr option = { 66178825Sdfr long = "salt" 67178825Sdfr short = "s" 68178825Sdfr type = "-flag" 69178825Sdfr help = "use unsalted keys" 70178825Sdfr default = "1" 71178825Sdfr } 72178825Sdfr option = { 73178825Sdfr long = "random" 74178825Sdfr short = "r" 75178825Sdfr type = "flag" 76178825Sdfr help = "generate random key" 77178825Sdfr } 78178825Sdfr option = { 79178825Sdfr long = "hex" 80178825Sdfr short = "H" 81178825Sdfr type = "flag" 82178825Sdfr help = "password is a hexadecimal string" 83178825Sdfr } 84178825Sdfr function = "kt_add" 85178825Sdfr help = "Adds a key to a keytab." 86178825Sdfr max_args = "0" 87178825Sdfr} 88178825Sdfrcommand = { 89178825Sdfr name = "change" 90178825Sdfr option = { 91178825Sdfr long = "realm" 92178825Sdfr short = "r" 93178825Sdfr type = "string" 94178825Sdfr argument = "realm" 95178825Sdfr help = "realm to use" 96178825Sdfr } 97178825Sdfr option = { 98178825Sdfr long = "admin-server" 99178825Sdfr short = "a" 100178825Sdfr type = "string" 101178825Sdfr argument = "host" 102178825Sdfr help = "server to contact" 103178825Sdfr } 104178825Sdfr option = { 105178825Sdfr long = "server-port" 106178825Sdfr short = "s" 107178825Sdfr type = "integer" 108178825Sdfr argument = "port number" 109178825Sdfr help = "port number on server" 110178825Sdfr } 111178825Sdfr function = "kt_change" 112178825Sdfr argument = "[principal...]" 113178825Sdfr help = "Change keys for specified principals (default all)." 114178825Sdfr} 115178825Sdfrcommand = { 116178825Sdfr name = "copy" 117178825Sdfr function = "kt_copy" 118178825Sdfr argument = "source destination" 119178825Sdfr min_args = "2" 120178825Sdfr max_args = "2" 121178825Sdfr help = "Copies one keytab to another." 122178825Sdfr} 123178825Sdfrcommand = { 124178825Sdfr name = "get" 125178825Sdfr option = { 126178825Sdfr long = "principal" 127178825Sdfr short = "p" 128178825Sdfr type = "string" 129178825Sdfr help = "admin principal" 130178825Sdfr argument = "principal" 131178825Sdfr } 132178825Sdfr option = { 133178825Sdfr long = "enctypes" 134178825Sdfr short = "e" 135178825Sdfr type = "strings" 136178825Sdfr help = "encryption types to use" 137178825Sdfr argument = "enctype" 138178825Sdfr } 139178825Sdfr option = { 140178825Sdfr long = "realm" 141178825Sdfr short = "r" 142178825Sdfr type = "string" 143178825Sdfr argument = "realm" 144178825Sdfr help = "realm to use" 145178825Sdfr } 146178825Sdfr option = { 147178825Sdfr long = "admin-server" 148178825Sdfr short = "a" 149178825Sdfr type = "string" 150178825Sdfr argument = "host" 151178825Sdfr help = "server to contact" 152178825Sdfr } 153178825Sdfr option = { 154178825Sdfr long = "server-port" 155178825Sdfr short = "s" 156178825Sdfr type = "integer" 157178825Sdfr argument = "port number" 158178825Sdfr help = "port number on server" 159178825Sdfr } 160178825Sdfr function = "kt_get" 161178825Sdfr min_args = "1" 162178825Sdfr argument = "principal..." 163178825Sdfr help = "Change keys for specified principals, and add them to the keytab." 164178825Sdfr} 165178825Sdfrcommand = { 166178825Sdfr name = "list" 167178825Sdfr option = { 168178825Sdfr long = "keys" 169178825Sdfr type = "flag" 170178825Sdfr help = "show key values" 171178825Sdfr } 172178825Sdfr option = { 173178825Sdfr long = "timestamp" 174178825Sdfr type = "flag" 175178825Sdfr help = "show timestamps" 176178825Sdfr } 177178825Sdfr max_args = "0" 178178825Sdfr function = "kt_list" 179178825Sdfr help = "Show contents of keytab." 180178825Sdfr} 181178825Sdfrcommand = { 182178825Sdfr name = "purge" 183178825Sdfr option = { 184178825Sdfr long = "age" 185178825Sdfr type = "string" 186178825Sdfr help = "age to retiere" 187178825Sdfr default = "1 week"; 188178825Sdfr argument = "time" 189178825Sdfr } 190178825Sdfr max_args = "0" 191178825Sdfr function = "kt_purge" 192178825Sdfr help = "Remove superceded keys from keytab." 193178825Sdfr} 194178825Sdfrcommand = { 195178825Sdfr name = "remove" 196178825Sdfr name = "delete" 197178825Sdfr option = { 198178825Sdfr long = "principal" 199178825Sdfr short = "p" 200178825Sdfr type = "string" 201178825Sdfr help = "principal to remove" 202178825Sdfr argument = "principal" 203178825Sdfr } 204178825Sdfr option = { 205178825Sdfr long = "kvno" 206178825Sdfr short = "V" 207178825Sdfr type = "integer" 208178825Sdfr help = "key version to remove" 209178825Sdfr argument = "enctype" 210178825Sdfr default = "0" 211178825Sdfr } 212178825Sdfr option = { 213178825Sdfr long = "enctype" 214178825Sdfr short = "e" 215178825Sdfr type = "string" 216178825Sdfr help = "enctype to remove" 217178825Sdfr argument = "enctype" 218178825Sdfr } 219178825Sdfr max_args = "0" 220178825Sdfr function = "kt_remove" 221178825Sdfr help = "Remove keys from keytab." 222178825Sdfr} 223178825Sdfrcommand = { 224178825Sdfr name = "rename" 225178825Sdfr function = "kt_rename" 226178825Sdfr argument = "from to" 227178825Sdfr min_args = "2" 228178825Sdfr max_args = "2" 229178825Sdfr help = "Renames an entry in the keytab." 230178825Sdfr option = { 231233294Sstas long = "delete" 232233294Sstas type = "-flag" 233233294Sstas help = "don't delete orignal entry" 234178825Sdfr } 235178825Sdfr} 236178825Sdfrcommand = { 237233294Sstas name = "destroy" 238233294Sstas function = "kt_destroy" 239178825Sdfr max_args = "0" 240233294Sstas help = "Destroy (remove) the keytab." 241178825Sdfr} 242178825Sdfrcommand = { 243178825Sdfr name = "help" 244178825Sdfr argument = "command" 245178825Sdfr max_args = "1" 246178825Sdfr function = "help" 247178825Sdfr} 248