[26024] | 1 | /* $Id: moira_site.h 4113 2013-05-28 14:29:10Z zacheiss $ |
---|
[23095] | 2 | * |
---|
| 3 | * This file contains all definitions that allow easy access to |
---|
| 4 | * elements returned by most of the @i[Moira] queries. It also defines |
---|
| 5 | * the default server location and the directories used on the server. |
---|
| 6 | * |
---|
| 7 | * If the order of the arguments in the @i[Moira] queries change (again) |
---|
| 8 | * then all that needs to be changed are the values of these items |
---|
| 9 | * and all should be well, (hopefully :-). |
---|
| 10 | * |
---|
| 11 | * Chris D. Peterson - kit@athena |
---|
| 12 | * 7/27/88 |
---|
| 13 | * |
---|
| 14 | * Copyright (C) 1988-1998 by the Massachusetts Institute of Technology. |
---|
| 15 | * For further information on copyright and distribution |
---|
| 16 | * see the file <mit-copyright.h>. |
---|
| 17 | */ |
---|
| 18 | |
---|
| 19 | #ifndef _moira_site_ |
---|
| 20 | #define _moira_site_ |
---|
| 21 | |
---|
| 22 | #include "mit-copyright.h" |
---|
| 23 | |
---|
| 24 | /* Default Moira server to connect to */ |
---|
| 25 | #define MOIRA_SERVER "MOIRA.MIT.EDU:moira_db" |
---|
| 26 | |
---|
| 27 | |
---|
| 28 | #define NAME 0 |
---|
| 29 | |
---|
| 30 | /* get_ace_use */ |
---|
| 31 | |
---|
| 32 | #define ACE_TYPE 0 |
---|
| 33 | #define ACE_NAME 1 |
---|
| 34 | #define ACE_END 2 |
---|
| 35 | |
---|
| 36 | /* acl queries */ |
---|
| 37 | |
---|
| 38 | #define ACL_HOST 0 |
---|
| 39 | #define ACL_TARGET 1 |
---|
| 40 | #define ACL_KIND 2 |
---|
| 41 | #define ACL_LIST 3 |
---|
| 42 | #define ACL_MODTIME 4 |
---|
| 43 | #define ACL_MODBY 5 |
---|
| 44 | #define ACL_MODWITH 6 |
---|
| 45 | #define ACL_END 7 |
---|
| 46 | |
---|
| 47 | /* alias queries */ |
---|
| 48 | |
---|
| 49 | #define ALIAS_NAME 0 |
---|
| 50 | #define ALIAS_TYPE 1 |
---|
| 51 | #define ALIAS_TRANS 2 |
---|
| 52 | #define ALIAS_END 3 |
---|
| 53 | |
---|
| 54 | /* Cluster information queries */ |
---|
| 55 | |
---|
| 56 | #define C_NAME 0 |
---|
| 57 | #define C_DESCRIPT 1 |
---|
| 58 | #define C_LOCATION 2 |
---|
| 59 | #define C_MODTIME 3 |
---|
| 60 | #define C_MODBY 4 |
---|
| 61 | #define C_MODWITH 5 |
---|
| 62 | #define C_END 6 |
---|
| 63 | |
---|
| 64 | /* Cluster Data information queries */ |
---|
| 65 | |
---|
| 66 | #define CD_NAME 0 |
---|
| 67 | #define CD_LABEL 1 |
---|
| 68 | #define CD_DATA 2 |
---|
| 69 | #define CD_END 3 |
---|
| 70 | |
---|
| 71 | /* Delete Member from list queries. */ |
---|
| 72 | |
---|
| 73 | #define DM_LIST 0 |
---|
| 74 | #define DM_TYPE 1 |
---|
| 75 | #define DM_MEMBER 2 |
---|
| 76 | #define DM_END 3 |
---|
| 77 | |
---|
| 78 | /* Finger queries */ |
---|
| 79 | |
---|
| 80 | #define F_NAME 0 |
---|
| 81 | #define F_FULLNAME 1 |
---|
| 82 | #define F_NICKNAME 2 |
---|
| 83 | #define F_HOME_ADDR 3 |
---|
| 84 | #define F_HOME_PHONE 4 |
---|
| 85 | #define F_OFFICE_ADDR 5 |
---|
| 86 | #define F_OFFICE_PHONE 6 |
---|
| 87 | #define F_MIT_DEPT 7 |
---|
| 88 | #define F_MIT_AFFIL 8 |
---|
| 89 | #define F_MODTIME 9 |
---|
| 90 | #define F_MODBY 10 |
---|
| 91 | #define F_MODWITH 11 |
---|
| 92 | #define F_END 12 |
---|
| 93 | |
---|
| 94 | /* Filesys queries */ |
---|
| 95 | |
---|
| 96 | #define FS_NAME 0 |
---|
| 97 | #define FS_TYPE 1 |
---|
| 98 | #define FS_MACHINE 2 |
---|
| 99 | #define FS_PACK 3 |
---|
| 100 | #define FS_M_POINT 4 |
---|
| 101 | #define FS_ACCESS 5 |
---|
| 102 | #define FS_COMMENTS 6 |
---|
| 103 | #define FS_OWNER 7 |
---|
| 104 | #define FS_OWNERS 8 |
---|
| 105 | #define FS_CREATE 9 |
---|
| 106 | #define FS_L_TYPE 10 |
---|
| 107 | #define FS_MODTIME 11 |
---|
| 108 | #define FS_MODBY 12 |
---|
| 109 | #define FS_MODWITH 13 |
---|
| 110 | #define FS_END 14 |
---|
| 111 | |
---|
| 112 | /* Get List Of Member queries. */ |
---|
| 113 | |
---|
| 114 | #define GLOM_NAME 0 |
---|
| 115 | #define GLOM_ACTIVE 1 |
---|
| 116 | #define GLOM_PUBLIC 2 |
---|
| 117 | #define GLOM_HIDDEN 3 |
---|
| 118 | #define GLOM_MAILLIST 4 |
---|
| 119 | #define GLOM_GROUP 5 |
---|
| 120 | #define GLOM_END 6 |
---|
| 121 | |
---|
| 122 | /* Kerberos/User Map */ |
---|
| 123 | |
---|
| 124 | #define KMAP_USER 0 |
---|
| 125 | #define KMAP_PRINCIPAL 1 |
---|
| 126 | #define KMAP_END 2 |
---|
| 127 | |
---|
| 128 | /* General List information Queries, v4. */ |
---|
| 129 | |
---|
| 130 | #define L_NAME 0 |
---|
| 131 | #define L_ACTIVE 1 |
---|
| 132 | #define L_PUBLIC 2 |
---|
| 133 | #define L_HIDDEN 3 |
---|
| 134 | #define L_MAILLIST 4 |
---|
| 135 | #define L_GROUP 5 |
---|
| 136 | #define L_GID 6 |
---|
| 137 | #define L_NFSGROUP 7 |
---|
| 138 | #define L_MAILMAN 8 |
---|
| 139 | #define L_MAILMAN_SERVER 9 |
---|
| 140 | #define L_ACE_TYPE 10 |
---|
| 141 | #define L_ACE_NAME 11 |
---|
| 142 | #define L_MEMACE_TYPE 12 |
---|
| 143 | #define L_MEMACE_NAME 13 |
---|
| 144 | #define L_DESC 14 |
---|
| 145 | #define L_MODTIME 15 |
---|
| 146 | #define L_MODBY 16 |
---|
| 147 | #define L_MODWITH 17 |
---|
| 148 | #define L_END 18 |
---|
| 149 | |
---|
| 150 | /* List Member information queries. */ |
---|
| 151 | |
---|
| 152 | #define LM_LIST 0 |
---|
| 153 | #define LM_TYPE 1 |
---|
| 154 | #define LM_MEMBER 2 |
---|
| 155 | #define LM_END 3 |
---|
| 156 | |
---|
| 157 | #define LM_TAG 3 |
---|
| 158 | #define LM_TAG_END 4 |
---|
| 159 | |
---|
| 160 | /* Machine information queries */ |
---|
| 161 | |
---|
| 162 | #define M_NAME 0 |
---|
| 163 | #define M_VENDOR 1 |
---|
| 164 | #define M_TYPE 1 |
---|
| 165 | #define M_MODEL 2 |
---|
| 166 | #define M_OS 3 |
---|
| 167 | #define M_LOC 4 |
---|
| 168 | #define M_CONTACT 5 |
---|
| 169 | #define M_BILL_CONTACT 6 |
---|
| 170 | #define M_ACCT_NUMBER 7 |
---|
| 171 | #define M_USE 8 |
---|
| 172 | #define M_STAT 9 |
---|
| 173 | #define M_STAT_CHNG 10 |
---|
| 174 | #define M_SUBNET 11 |
---|
| 175 | #define M_ADDR 12 |
---|
| 176 | #define M_OWNER_TYPE 13 |
---|
| 177 | #define M_OWNER_NAME 14 |
---|
| 178 | #define M_ACOMMENT 15 |
---|
| 179 | #define M_OCOMMENT 16 |
---|
| 180 | #define M_CREATED 17 |
---|
| 181 | #define M_CREATOR 18 |
---|
| 182 | #define M_INUSE 19 |
---|
| 183 | #define M_MODTIME 20 |
---|
| 184 | #define M_MODBY 21 |
---|
| 185 | #define M_MODWITH 22 |
---|
| 186 | #define M_END 23 |
---|
| 187 | |
---|
| 188 | /* Machine to Cluster mapping */ |
---|
| 189 | |
---|
| 190 | #define MAP_MACHINE 0 |
---|
| 191 | #define MAP_CLUSTER 1 |
---|
| 192 | #define MAP_END 2 |
---|
| 193 | |
---|
| 194 | /* NFS phys. queries. */ |
---|
| 195 | |
---|
| 196 | #define NFS_NAME 0 |
---|
| 197 | #define NFS_DIR 1 |
---|
| 198 | #define NFS_DEVICE 2 |
---|
| 199 | #define NFS_STATUS 3 |
---|
| 200 | #define NFS_ALLOC 4 |
---|
| 201 | #define NFS_SIZE 5 |
---|
| 202 | #define NFS_MODTIME 6 |
---|
| 203 | #define NFS_MODBY 7 |
---|
| 204 | #define NFS_MODWITH 8 |
---|
| 205 | #define NFS_END 9 |
---|
| 206 | |
---|
| 207 | /* Printer queries */ |
---|
| 208 | |
---|
[24319] | 209 | #define PRN_NAME 0 |
---|
| 210 | #define PRN_TYPE 1 |
---|
| 211 | #define PRN_HWTYPE 2 |
---|
| 212 | #define PRN_DUPLEXNAME 3 |
---|
| 213 | #define PRN_DUPLEXDEFAULT 4 |
---|
| 214 | #define PRN_HOLDDEFAULT 5 |
---|
| 215 | #define PRN_STATUS 6 |
---|
| 216 | #define PRN_HOSTNAME 7 |
---|
| 217 | #define PRN_LOGHOST 8 |
---|
| 218 | #define PRN_RM 9 |
---|
| 219 | #define PRN_RP 10 |
---|
| 220 | #define PRN_RQ 11 |
---|
| 221 | #define PRN_KA 12 |
---|
| 222 | #define PRN_PC 13 |
---|
| 223 | #define PRN_AC 14 |
---|
| 224 | #define PRN_LPC_ACL 15 |
---|
| 225 | #define PRN_REPORT_LIST 16 |
---|
| 226 | #define PRN_BANNER 17 |
---|
| 227 | #define PRN_LOCATION 18 |
---|
| 228 | #define PRN_CONTACT 19 |
---|
| 229 | #define PRN_MODTIME 20 |
---|
| 230 | #define PRN_MODBY 21 |
---|
| 231 | #define PRN_MODWITH 22 |
---|
| 232 | #define PRN_END 23 |
---|
[23095] | 233 | |
---|
| 234 | #define PRN_BANNER_NONE 0 |
---|
| 235 | #define PRN_BANNER_FIRST 1 |
---|
| 236 | #define PRN_BANNER_LAST 2 |
---|
| 237 | |
---|
| 238 | /* Print Server queries */ |
---|
| 239 | |
---|
| 240 | #define PRINTSERVER_HOST 0 |
---|
| 241 | #define PRINTSERVER_KIND 1 |
---|
| 242 | #define PRINTSERVER_TYPES 2 |
---|
| 243 | #define PRINTSERVER_OWNER_TYPE 3 |
---|
| 244 | #define PRINTSERVER_OWNER_NAME 4 |
---|
| 245 | #define PRINTSERVER_LPC_ACL 5 |
---|
| 246 | #define PRINTSERVER_MODTIME 6 |
---|
| 247 | #define PRINTSERVER_MODBY 7 |
---|
| 248 | #define PRINTSERVER_MODWITH 8 |
---|
| 249 | #define PRINTSERVER_END 9 |
---|
| 250 | |
---|
| 251 | /* PO box information queries */ |
---|
| 252 | |
---|
| 253 | #define PO_NAME 0 |
---|
| 254 | #define PO_TYPE 1 |
---|
| 255 | #define PO_BOX 2 |
---|
| 256 | #define PO_ADDR 3 |
---|
| 257 | #define PO_END 4 |
---|
| 258 | |
---|
| 259 | /* Quota queries */ |
---|
| 260 | |
---|
| 261 | #define Q_FILESYS 0 |
---|
| 262 | #define Q_TYPE 1 |
---|
| 263 | #define Q_NAME 2 |
---|
| 264 | #define Q_QUOTA 3 |
---|
| 265 | #define Q_DIRECTORY 4 |
---|
| 266 | #define Q_MACHINE 5 |
---|
| 267 | #define Q_MODTIME 6 |
---|
| 268 | #define Q_MODBY 7 |
---|
| 269 | #define Q_MODWITH 8 |
---|
| 270 | #define Q_END 9 |
---|
| 271 | |
---|
| 272 | /* Service info */ |
---|
| 273 | |
---|
| 274 | #define SVC_SERVICE 0 |
---|
| 275 | #define SVC_INTERVAL 1 |
---|
| 276 | #define SVC_TARGET 2 |
---|
| 277 | #define SVC_SCRIPT 3 |
---|
| 278 | #define SVC_DFGEN 4 |
---|
| 279 | #define SVC_DFCHECK 5 |
---|
| 280 | #define SVC_TYPE 6 |
---|
| 281 | #define SVC_ENABLE 7 |
---|
| 282 | #define SVC_INPROGRESS 8 |
---|
| 283 | #define SVC_HARDERROR 9 |
---|
| 284 | #define SVC_ERRMSG 10 |
---|
| 285 | #define SVC_ACE_TYPE 11 |
---|
| 286 | #define SVC_ACE_NAME 12 |
---|
| 287 | #define SVC_MODTIME 13 |
---|
| 288 | #define SVC_MODBY 14 |
---|
| 289 | #define SVC_MODWITH 15 |
---|
| 290 | #define SVC_END 16 |
---|
| 291 | |
---|
| 292 | /* Service add/update */ |
---|
| 293 | |
---|
| 294 | #define SC_SERVICE 0 |
---|
| 295 | #define SC_INTERVAL 1 |
---|
| 296 | #define SC_TARGET 2 |
---|
| 297 | #define SC_SCRIPT 3 |
---|
| 298 | #define SC_TYPE 4 |
---|
| 299 | #define SC_ENABLE 5 |
---|
| 300 | #define SC_ACE_TYPE 6 |
---|
| 301 | #define SC_ACE_NAME 7 |
---|
| 302 | #define SC_END 8 |
---|
| 303 | |
---|
| 304 | /* Service/host tuples */ |
---|
| 305 | |
---|
| 306 | #define SH_SERVICE 0 |
---|
| 307 | #define SH_MACHINE 1 |
---|
| 308 | #define SH_ENABLE 2 |
---|
| 309 | #define SH_OVERRIDE 3 |
---|
| 310 | #define SH_SUCCESS 4 |
---|
| 311 | #define SH_INPROGRESS 5 |
---|
| 312 | #define SH_HOSTERROR 6 |
---|
| 313 | #define SH_ERRMSG 7 |
---|
| 314 | #define SH_LASTTRY 8 |
---|
| 315 | #define SH_LASTSUCCESS 9 |
---|
| 316 | #define SH_VALUE1 10 |
---|
| 317 | #define SH_VALUE2 11 |
---|
| 318 | #define SH_VALUE3 12 |
---|
| 319 | #define SH_MODTIME 13 |
---|
| 320 | #define SH_MODBY 14 |
---|
| 321 | #define SH_MODWITH 15 |
---|
| 322 | #define SH_END 16 |
---|
| 323 | |
---|
| 324 | /* Service/host tuple add & updates */ |
---|
| 325 | |
---|
| 326 | #define SHI_SERVICE 0 |
---|
| 327 | #define SHI_MACHINE 1 |
---|
| 328 | #define SHI_ENABLE 2 |
---|
| 329 | #define SHI_VALUE1 3 |
---|
| 330 | #define SHI_VALUE2 4 |
---|
| 331 | #define SHI_VALUE3 5 |
---|
| 332 | #define SHI_END 6 |
---|
| 333 | |
---|
| 334 | /* Subnet info */ |
---|
| 335 | |
---|
| 336 | #define SN_NAME 0 |
---|
| 337 | #define SN_DESC 1 |
---|
| 338 | #define SN_STATUS 2 |
---|
| 339 | #define SN_CONTACT 3 |
---|
| 340 | #define SN_ACCT_NUMBER 4 |
---|
| 341 | #define SN_ADDRESS 5 |
---|
| 342 | #define SN_MASK 6 |
---|
| 343 | #define SN_LOW 7 |
---|
| 344 | #define SN_HIGH 8 |
---|
| 345 | #define SN_PREFIX 9 |
---|
| 346 | #define SN_ACE_TYPE 10 |
---|
| 347 | #define SN_ACE_NAME 11 |
---|
| 348 | #define SN_MODTIME 12 |
---|
| 349 | #define SN_MODBY 13 |
---|
| 350 | #define SN_MODWITH 14 |
---|
| 351 | #define SN_END 15 |
---|
| 352 | |
---|
| 353 | /* Subnet statuses */ |
---|
| 354 | #define SNET_STATUS_RESERVED 0 |
---|
| 355 | #define SNET_STATUS_BILLABLE 1 |
---|
| 356 | #define SNET_STATUS_PRIVATE_10MBPS 2 |
---|
| 357 | #define SNET_STATUS_PRIVATE_100MBPS 3 |
---|
| 358 | #define SNET_STATUS_PRIVATE_OTHER 4 |
---|
| 359 | #define SNET_STATUS_RESNET_DORM 5 |
---|
| 360 | #define SNET_STATUS_INFRASTRUCTURE 6 |
---|
| 361 | #define SNET_STATUS_PRIVATE_1000MBPS 7 |
---|
| 362 | #define SNET_STATUS_RESNET_FSILG 8 |
---|
| 363 | |
---|
| 364 | /* User Information queries, v11 */ |
---|
| 365 | |
---|
| 366 | #define U_NAME 0 |
---|
| 367 | #define U_UID 1 |
---|
| 368 | #define U_SHELL 2 |
---|
| 369 | #define U_WINCONSOLESHELL 3 |
---|
| 370 | #define U_LAST 4 |
---|
| 371 | #define U_FIRST 5 |
---|
| 372 | #define U_MIDDLE 6 |
---|
| 373 | #define U_STATE 7 |
---|
| 374 | #define U_MITID 8 |
---|
| 375 | #define U_CLASS 9 |
---|
| 376 | #define U_COMMENT 10 |
---|
| 377 | #define U_SIGNATURE 11 |
---|
| 378 | #define U_SECURE 12 |
---|
| 379 | #define U_WINHOMEDIR 13 |
---|
| 380 | #define U_WINPROFILEDIR 14 |
---|
| 381 | #define U_SPONSOR_TYPE 15 |
---|
| 382 | #define U_SPONSOR_NAME 16 |
---|
| 383 | #define U_EXPIRATION 17 |
---|
[24319] | 384 | #define U_ALT_EMAIL 18 |
---|
| 385 | #define U_ALT_PHONE 19 |
---|
[26024] | 386 | #define U_AFF_BASIC 20 |
---|
| 387 | #define U_AFF_DETAILED 21 |
---|
| 388 | #define U_MODTIME 22 |
---|
| 389 | #define U_MODBY 23 |
---|
| 390 | #define U_MODWITH 24 |
---|
| 391 | #define U_CREATED 25 |
---|
| 392 | #define U_CREATOR 26 |
---|
| 393 | #define U_END 27 |
---|
[23095] | 394 | |
---|
| 395 | /* User states (the value of argv[U_STATE] from a user query) */ |
---|
| 396 | |
---|
| 397 | #define US_NO_LOGIN_YET 0 |
---|
| 398 | #define US_REGISTERED 1 |
---|
| 399 | #define US_NO_PASSWD 2 |
---|
| 400 | #define US_DELETED 3 |
---|
| 401 | #define US_NOT_ALLOWED 4 |
---|
| 402 | #define US_ENROLLED 5 |
---|
| 403 | #define US_ENROLL_NOT_ALLOWED 6 |
---|
| 404 | #define US_HALF_ENROLLED 7 |
---|
| 405 | #define US_NO_LOGIN_YET_KERBEROS_ONLY 8 |
---|
| 406 | #define US_REGISTERED_KERBEROS_ONLY 9 |
---|
[25817] | 407 | #define US_SUSPENDED 10 |
---|
[26024] | 408 | #define US_EXPIRED 11 |
---|
| 409 | #define US_EXPIRED_KERBEROS_ONLY 12 |
---|
| 410 | #define US_END 13 |
---|
[23095] | 411 | |
---|
| 412 | /* User shell queries */ |
---|
| 413 | |
---|
| 414 | #define USH_NAME 0 |
---|
| 415 | #define USH_SHELL 1 |
---|
| 416 | #define USH_END 2 |
---|
| 417 | |
---|
| 418 | /* Zephyr ACL queries */ |
---|
| 419 | |
---|
| 420 | #define ZA_CLASS 0 |
---|
| 421 | #define ZA_XMT_TYPE 1 |
---|
| 422 | #define ZA_XMT_ID 2 |
---|
| 423 | #define ZA_SUB_TYPE 3 |
---|
| 424 | #define ZA_SUB_ID 4 |
---|
| 425 | #define ZA_IWS_TYPE 5 |
---|
| 426 | #define ZA_IWS_ID 6 |
---|
| 427 | #define ZA_IUI_TYPE 7 |
---|
| 428 | #define ZA_IUI_ID 8 |
---|
| 429 | #define ZA_OWNER_TYPE 9 |
---|
| 430 | #define ZA_OWNER_ID 10 |
---|
| 431 | #define ZA_MODTIME 11 |
---|
| 432 | #define ZA_MODBY 12 |
---|
| 433 | #define ZA_MODWITH 13 |
---|
| 434 | #define ZA_END 14 |
---|
| 435 | |
---|
| 436 | /* Container queries */ |
---|
| 437 | |
---|
| 438 | #define CON_NAME 0 |
---|
| 439 | #define CON_PUBLIC 1 |
---|
| 440 | #define CON_DESCRIPT 2 |
---|
| 441 | #define CON_LOCATION 3 |
---|
| 442 | #define CON_CONTACT 4 |
---|
| 443 | #define CON_OWNER_TYPE 5 |
---|
| 444 | #define CON_OWNER_NAME 6 |
---|
| 445 | #define CON_MEMACE_TYPE 7 |
---|
| 446 | #define CON_MEMACE_NAME 8 |
---|
| 447 | #define CON_MODTIME 9 |
---|
| 448 | #define CON_MODBY 10 |
---|
| 449 | #define CON_MODWITH 11 |
---|
| 450 | #define CON_END 12 |
---|
| 451 | |
---|
| 452 | /* Directories & files used on the server machine: */ |
---|
| 453 | |
---|
| 454 | #define MOIRA_DIR "/moira" /* home directory of the system */ |
---|
| 455 | #define BIN_DIR "/moira/bin" /* where progs live */ |
---|
| 456 | #define DCM_DIR "/moira/dcm" /* where DCM output files end up */ |
---|
| 457 | #define LOCK_DIR "/moira/dcm/locks" /* where DCM puts lock files */ |
---|
| 458 | |
---|
| 459 | #define CRITERRLOG "/moira/critical.log" |
---|
| 460 | #define JOURNAL "/moira/journal" |
---|
| 461 | #define REGJOURNAL "/moira/journal.reg" |
---|
| 462 | #define NODCMFILE "/etc/nodcm" /* flag to inhibit DCM running */ |
---|
| 463 | #define MOIRA_MOTD_FILE "/etc/smsdown" /* make the server go to sleep */ |
---|
| 464 | |
---|
| 465 | #endif /* _moira_site_ */ /* Do not add anything after this line. */ |
---|