2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
13 #include <afs/afs_Admin.h>
14 #include <afs/afs_utilAdmin.h>
15 #include <afs/afs_vosAdmin.h>
16 #include <afs/afs_bosAdmin.h>
17 #include <afs/afs_kasAdmin.h>
18 #include <afs/afs_ptsAdmin.h>
19 #include <afs/afs_clientAdmin.h>
20 #include <afs/pterror.h>
22 #define __KAUTILS__ // prevents including anything but error #s from kautils.h
23 #include <afs/kautils.h>
28 * DEFINITIONS ________________________________________________________________
32 #define NO_PARTITION ((unsigned int)-1)
33 #define NO_VOLUME ((VOLUMEID)-1)
35 typedef enum // WORKERTASK
37 wtaskVosBackupVolumeCreate,
38 wtaskVosBackupVolumeCreateMultiple,
40 wtaskVosPartitionGetBegin,
41 wtaskVosPartitionGetNext,
42 wtaskVosPartitionGetDone,
46 wtaskVosFileServerAddressChange,
47 wtaskVosFileServerAddressRemove,
48 wtaskVosFileServerGetBegin,
49 wtaskVosFileServerGetNext,
50 wtaskVosFileServerGetDone,
51 wtaskVosServerTransactionStatusGetBegin,
52 wtaskVosServerTransactionStatusGetNext,
53 wtaskVosServerTransactionStatusGetDone,
58 wtaskVosVLDBEntryRemove,
59 wtaskVosVLDBEntryLock,
60 wtaskVosVLDBEntryUnlock,
61 wtaskVosVLDBReadOnlySiteCreate,
62 wtaskVosVLDBReadOnlySiteDelete,
68 wtaskVosVolumeRestore,
70 wtaskVosVolumeOffline,
72 wtaskVosVolumeGetBegin,
73 wtaskVosVolumeGetNext,
74 wtaskVosVolumeGetDone,
76 wtaskVosVolumeRelease,
78 wtaskVosPartitionNameToId,
79 wtaskVosPartitionIdToName,
80 wtaskVosVolumeQuotaChange,
83 wtaskBosProcessCreate,
84 wtaskBosProcessDelete,
85 wtaskBosProcessExecutionStateGet,
86 wtaskBosAuxiliaryProcessStatusDeallocate,
87 wtaskBosProcessExecutionStateSet,
88 wtaskBosProcessExecutionStateSetTemporary,
89 wtaskBosProcessNameGetBegin,
90 wtaskBosProcessNameGetDone,
91 wtaskBosProcessNameGetNext,
92 wtaskBosProcessInfoGet,
93 wtaskBosProcessParameterGetBegin,
94 wtaskBosProcessParameterGetDone,
95 wtaskBosProcessParameterGetNext,
96 wtaskBosProcessNotifierGet,
97 wtaskBosProcessRestart,
98 wtaskBosProcessAllStop,
99 wtaskBosProcessAllStart,
100 wtaskBosProcessAllWaitStop,
101 wtaskBosProcessAllStopAndRestart,
104 wtaskBosAdminGetBegin,
105 wtaskBosAdminGetDone,
106 wtaskBosAdminGetNext,
116 wtaskBosHostGetBegin,
119 wtaskBosExecutableCreate,
120 wtaskBosExecutableRevert,
121 wtaskBosExecutableTimestampGet,
122 wtaskBosExecutablePrune,
123 wtaskBosExecutableRestartTimeSet,
124 wtaskBosExecutableRestartTimeGet,
127 wtaskBosCommandExecute,
131 wtaskKasServerRandomKeyGet,
133 wtaskKasPrincipalCreate,
134 wtaskKasPrincipalDelete,
135 wtaskKasPrincipalGet,
136 wtaskKasPrincipalGetBegin,
137 wtaskKasPrincipalGetNext,
138 wtaskKasPrincipalGetDone,
139 wtaskKasPrincipalKeySet,
140 wtaskKasPrincipalLockStatusGet,
141 wtaskKasPrincipalUnlock,
142 wtaskKasPrincipalFieldsSet,
143 wtaskPtsGroupMemberAdd,
144 wtaskPtsGroupOwnerChange,
150 wtaskPtsGroupMemberListBegin,
151 wtaskPtsGroupMemberListNext,
152 wtaskPtsGroupMemberListDone,
153 wtaskPtsGroupMemberRemove,
163 wtaskPtsUserMemberListBegin,
164 wtaskPtsUserMemberListNext,
165 wtaskPtsUserMemberListDone,
166 wtaskPtsOwnedGroupListBegin,
167 wtaskPtsOwnedGroupListNext,
168 wtaskPtsOwnedGroupListDone,
169 wtaskClientTokenGetExisting,
171 wtaskClientCellClose,
172 wtaskClientLocalCellGet,
173 wtaskClientAFSServerGet,
174 wtaskClientAFSServerGetBegin,
175 wtaskClientAFSServerGetNext,
176 wtaskClientAFSServerGetDone,
177 wtaskUtilDatabaseServerGetBegin,
178 wtaskUtilDatabaseServerGetNext,
179 wtaskUtilDatabaseServerGetDone,
183 typedef union // WORKERPACKET
187 PVOID hCell; // [in] token from AdminCellOpen()
188 VOLUMEID idVolume; // [in] id of read/write volume
189 } wpVosBackupVolumeCreate;
192 PVOID hCell; // [in] token from AdminCellOpen()
193 PVOID hServer; // [in] server token (or NULL)
194 int idPartition; // [in] partition ID (or NO_PARTITION)
195 LPTSTR pszPrefix; // [in] volume prefix to match (or NULL)
196 BOOL fExclude; // [in] TRUE if prefix is exclusionary
197 } wpVosBackupVolumeCreateMultiple;
200 PVOID hCell; // [in] token from AdminCellOpen()
201 PVOID hServer; // [in] token from VosServerOpen()
202 int idPartition; // [in] partition ID
203 vos_partitionEntry_t Data; // [out] partition properties
207 PVOID hCell; // [in] token from AdminCellOpen()
208 PVOID hServer; // [in] token from VosServerOpen()
209 PVOID hEnum; // [out] enumeration token
210 } wpVosPartitionGetBegin;
213 PVOID hEnum; // [in] enumeration token
214 vos_partitionEntry_t Data; // [out] partition properties
215 } wpVosPartitionGetNext;
218 PVOID hEnum; // [in] enumeration token
219 } wpVosPartitionGetDone;
222 PVOID hCell; // [in] token from AdminCellOpen()
223 LPTSTR pszServer; // [in] server name
224 PVOID hServer; // [out] server token
228 PVOID hServer; // [in] token from VosServerOpen()
232 PVOID hCell; // [in] token from AdminCellOpen()
233 PVOID hServer; // [in] token from VosServerOpen()
234 int idPartition; // [in] partition ID (or NO_PARTITION)
235 BOOL fForce; // [in] TRUE to force sync
239 PVOID hCell; // [in] token from AdminCellOpen()
240 SOCKADDR_IN addrOld; // [in] old address (or 0's to add new)
241 SOCKADDR_IN addrNew; // [in] new address (or 0's to del old)
242 } wpVosFileServerAddressChange;
245 PVOID hCell; // [in] token from AdminCellOpen()
246 SOCKADDR_IN addr; // [in] address to remove
247 } wpVosFileServerAddressRemove;
250 PVOID hCell; // [in] token from AdminCellOpen()
251 PVOID hEnum; // [out] enumeration token
252 } wpVosFileServerGetBegin;
255 PVOID hEnum; // [in] enumeration token
256 vos_fileServerEntry_t Entry; // [out] server entry (with addresses)
257 } wpVosFileServerGetNext;
260 PVOID hEnum; // [in] enumeration token
261 } wpVosFileServerGetDone;
264 PVOID hCell; // [in] token from AdminCellOpen()
265 PVOID hServer; // [in] token from VosServerOpen()
266 PVOID hEnum; // [out] enumeration token
267 } wpVosServerTransactionStatusGetBegin;
270 PVOID hEnum; // [in] enumeration token
271 vos_serverTransactionStatus_t Data; // [out] transaction information
272 } wpVosServerTransactionStatusGetNext;
275 PVOID hEnum; // [in] enumeration token
276 } wpVosServerTransactionStatusGetDone;
279 PVOID hCell; // [in] token from AdminCellOpen()
280 VOLUMEID idVolume; // [in] read/write volume ID
281 vos_vldbEntry_t Data; // [out] VLDB entry
285 PVOID hCell; // [in] token from AdminCellOpen()
286 PVOID hServer; // [in] server token (or NULL)
287 int idPartition; // [in] partition ID (or NO_PARTITION)
288 PVOID hEnum; // [out] enumeration token
292 PVOID hEnum; // [in] enumeration token
293 vos_vldbEntry_t Data; // [out] VLDB entry
297 PVOID hEnum; // [in] enumeration token
301 PVOID hCell; // [in] token from AdminCellOpen()
302 PVOID hServer; // [in] server token (or NULL)
303 int idPartition; // [in] partition ID (or NO_PARTITION)
304 VOLUMEID idVolume; // [in] read/write volume ID
305 } wpVosVLDBEntryRemove;
308 PVOID hCell; // [in] token from AdminCellOpen()
309 VOLUMEID idVolume; // [in] read/write volume ID
310 } wpVosVLDBEntryLock;
313 PVOID hCell; // [in] token from AdminCellOpen()
314 PVOID hServer; // [in] server token (or NULL)
315 int idPartition; // [in] partition ID (or NO_PARTITION)
316 VOLUMEID idVolume; // [in] read/write volume ID
317 } wpVosVLDBEntryUnlock;
320 PVOID hCell; // [in] token from AdminCellOpen()
321 PVOID hServer; // [in] token from VosServerOpen()
322 int idPartition; // [in] partition ID
323 VOLUMEID idVolume; // [in] read/write volume ID
324 } wpVosVLDBReadOnlySiteCreate;
327 PVOID hCell; // [in] token from AdminCellOpen()
328 PVOID hServer; // [in] token from VosServerOpen()
329 int idPartition; // [in] partition ID
330 VOLUMEID idVolume; // [in] read/write volume ID
331 } wpVosVLDBReadOnlySiteDelete;
334 PVOID hCell; // [in] token from AdminCellOpen()
335 PVOID hServer; // [in] token from VosServerOpen()
336 int idPartition; // [in] partition ID (or NO_PARTITION)
337 BOOL fForce; // [in] TRUE to force sync
341 PVOID hCell; // [in] token from AdminCellOpen()
342 PVOID hServer; // [in] token from VosServerOpen()
343 int idPartition; // [in] partition ID
344 LPTSTR pszVolume; // [in] volume name
345 ULONG ckQuota; // [in] initial quota
346 VOLUMEID idVolume; // [out] volume ID
350 PVOID hCell; // [in] token from AdminCellOpen()
351 PVOID hServer; // [in] token from VosServerOpen()
352 int idPartition; // [in] partition ID
353 VOLUMEID idVolume; // [in] volume ID
357 PVOID hCell; // [in] token from AdminCellOpen()
358 VOLUMEID idVolume; // [in] read/write volume ID
359 LPTSTR pszVolume; // [in] new volume name
363 PVOID hCell; // [in] token from AdminCellOpen()
364 PVOID hServer; // [in] token from VosServerOpen()
365 int idPartition; // [in] parition ID
366 VOLUMEID idVolume; // [in] volume ID
367 SYSTEMTIME stStart; // [in] start time
368 LPTSTR pszFilename; // [in] target filename (local)
372 PVOID hCell; // [in] token from AdminCellOpen()
373 PVOID hServer; // [in] token from VosServerOpen()
374 int idPartition; // [in] partition ID
375 VOLUMEID idVolume; // [in] read/write volume ID (or 0)
376 LPTSTR pszVolume; // [in] new volume name (or NULL)
377 LPTSTR pszFilename; // [in] source filename (local)
378 BOOL fIncremental; // [in] TRUE if restoring inc backup
379 } wpVosVolumeRestore;
382 PVOID hServer; // [in] token from VosServerOpen()
383 int idPartition; // [in] partition ID
384 VOLUMEID idVolume; // [in] read/write volume ID (or 0)
385 int csecSleep; // [in] sleep time
386 vos_volumeOnlineType_t Status; // [in] new status to indicate
390 PVOID hServer; // [in] token from VosServerOpen()
391 int idPartition; // [in] partition ID
392 VOLUMEID idVolume; // [in] volume ID
393 } wpVosVolumeOffline;
396 PVOID hCell; // [in] token from AdminCellOpen()
397 PVOID hServer; // [in] token from VosServerOpen()
398 int idPartition; // [in] partition ID
399 VOLUMEID idVolume; // [in] volume ID
400 vos_volumeEntry_t Data; // [out] volume properties
404 PVOID hCell; // [in] token from AdminCellOpen()
405 PVOID hServer; // [in] token from VosServerOpen()
406 int idPartition; // [in] partition ID
407 PVOID hEnum; // [out] enumeration token
408 } wpVosVolumeGetBegin;
411 PVOID hEnum; // [in] enumeration token
412 vos_volumeEntry_t Data; // [out] volume properties
413 } wpVosVolumeGetNext;
416 PVOID hEnum; // [in] enumeration token
417 } wpVosVolumeGetDone;
420 PVOID hCell; // [in] token from AdminCellOpen()
421 PVOID hServerFrom; // [in] source server token
422 int idPartitionFrom; // [in] source partition ID
423 PVOID hServerTo; // [in] target server token
424 int idPartitionTo; // [in] target partition ID
425 VOLUMEID idVolume; // [in] read/write volume ID
429 PVOID hCell; // [in] token from AdminCellOpen()
430 VOLUMEID idVolume; // [in] read/write volume ID
431 BOOL fForce; // [in] TRUE to force release
432 } wpVosVolumeRelease;
435 PVOID hCell; // [in] token from AdminCellOpen()
436 PVOID hServer; // [in] token from VosServerOpen()
437 int idPartition; // [in] partition ID
438 VOLUMEID idVolume; // [in] volume ID
439 BOOL fForce; // [in] TRUE to force delete
443 LPTSTR pszPartition; // [in] partition name
444 int idPartition; // [out] partition ID
445 } wpVosPartitionNameToId;
448 int idPartition; // [in] partition ID
449 LPTSTR pszPartition; // [out] partition name
450 } wpVosPartitionIdToName;
453 PVOID hCell; // [in] token from AdminCellOpen()
454 PVOID hServer; // [in] token from VosServerOpen()
455 int idPartition; // [in] partition ID
456 VOLUMEID idVolume; // [in] id of read/write volume
457 ULONG ckQuota; // [in] new quota
458 } wpVosVolumeQuotaChange;
461 PVOID hCell; // [in] token from AdminCellOpen()
462 LPTSTR pszServer; // [in] name of server to open
463 PVOID hServer; // [out] handle for server
467 PVOID hServer; // [in] token from BosServerOpen()
471 PVOID hServer; // [in] token from BosServerOpen()
472 LPTSTR pszService; // [in] name of new service
473 AFSSERVICETYPE type; // [in] service type (stCRON, stFS, etc)
474 LPTSTR pszCommand; // [in] full command-line to execute
475 LPTSTR pszTimeCron; // [in] date/time (CRON only)
476 LPTSTR pszNotifier; // [in] command executed on exit
477 } wpBosProcessCreate;
480 PVOID hServer; // [in] token from BosServerOpen()
481 LPTSTR pszService; // [in] service name
482 } wpBosProcessDelete;
485 PVOID hServer; // [in] token from BosServerOpen()
486 LPTSTR pszService; // [in] service name
487 SERVICESTATE state; // [out] current execution state
488 LPTSTR pszAuxStatus; // [out] additional status information
489 } wpBosProcessExecutionStateGet;
492 char *pszAuxStatusA; // [in] service string
493 } wpBosAuxiliaryProcessStatusDeallocate;
496 PVOID hServer; // [in] token from BosServerOpen()
497 LPTSTR pszService; // [in] service name
498 SERVICESTATE state; // [in] desired new service state
499 } wpBosProcessExecutionStateSet;
502 PVOID hServer; // [in] token from BosServerOpen()
503 LPTSTR pszService; // [in] service name
504 SERVICESTATE state; // [in] desired new service state
505 } wpBosProcessExecutionStateSetTemporary;
508 PVOID hServer; // [in] token from BosServerOpen()
509 PVOID hEnum; // [out] enumeration token
510 } wpBosProcessNameGetBegin;
513 PVOID hEnum; // [in] enumeration token
514 } wpBosProcessNameGetDone;
517 PVOID hEnum; // [in] enumeration token
518 LPTSTR pszService; // [in] service name
519 } wpBosProcessNameGetNext;
522 PVOID hServer; // [in] token from BosServerOpen()
523 LPTSTR pszService; // [in] service name
524 SERVICESTATUS ss; // [out] service properties
525 } wpBosProcessInfoGet;
528 PVOID hServer; // [in] token from BosServerOpen()
529 LPTSTR pszService; // [in] service name
530 PVOID hEnum; // [out] enumeration token
531 } wpBosProcessParameterGetBegin;
534 PVOID hEnum; // [in] enumeration token
535 } wpBosProcessParameterGetDone;
538 PVOID hEnum; // [in] enumeration token
539 LPTSTR pszParam; // [out] parameter
540 } wpBosProcessParameterGetNext;
543 PVOID hServer; // [in] token from BosServerOpen()
544 LPTSTR pszService; // [in] service name
545 LPTSTR pszNotifier; // [out] current notifier command
546 } wpBosProcessNotifierGet;
549 PVOID hServer; // [in] token from BosServerOpen()
550 LPTSTR pszService; // [in] service name
551 } wpBosProcessRestart;
554 PVOID hServer; // [in] token from BosServerOpen()
555 } wpBosProcessAllStop;
558 PVOID hServer; // [in] token from BosServerOpen()
559 } wpBosProcessAllStart;
562 PVOID hServer; // [in] token from BosServerOpen()
563 } wpBosProcessAllWaitStop;
566 PVOID hServer; // [in] token from BosServerOpen()
567 BOOL fRestartBOS; // [in] TRUE to also restart BOS
568 } wpBosProcessAllStopAndRestart;
571 PVOID hServer; // [in] token from BosServerOpen()
572 LPTSTR pszAdmin; // [in] administrator name
576 PVOID hServer; // [in] token from BosServerOpen()
577 LPTSTR pszAdmin; // [in] administrator name
581 PVOID hServer; // [in] token from BosServerOpen()
582 PVOID hEnum; // [out] enumeration token
583 } wpBosAdminGetBegin;
586 PVOID hEnum; // [in] enumeration token
590 PVOID hEnum; // [in] enumeration token
591 LPTSTR pszAdmin; // [out] administrator name
595 PVOID hServer; // [in] token from BosServerOpen()
596 ENCRYPTIONKEY key; // [in] encryption key to add
597 int keyVersion; // [in] version of new key
601 PVOID hServer; // [in] token from BosServerOpen()
602 int keyVersion; // [in] key version number to delete
606 PVOID hServer; // [in] token from BosServerOpen()
607 PVOID hEnum; // [out] enumeration token
611 PVOID hEnum; // [in] enumeration token
615 PVOID hEnum; // [in] enumeration token
616 int keyVersion; // [out] key version number
617 ENCRYPTIONKEY keyData; // [out] encryption key
618 ENCRYPTIONKEYINFO keyInfo; // [out] additional key information
622 PVOID hServer; // [in] token from BosServerOpen()
623 LPTSTR pszCell; // [in] cell name to assign
627 PVOID hServer; // [in] token from BosServerOpen()
628 LPTSTR pszCell; // [out] currently-assigned cell name
632 PVOID hServer; // [in] token from BosServerOpen()
633 LPTSTR pszServer; // [in] name of server to create
637 PVOID hServer; // [in] token from BosServerOpen()
638 LPTSTR pszServer; // [in] name of server to remove
642 PVOID hServer; // [in] token from BosServerOpen()
643 PVOID hEnum; // [out] enumeration token
647 PVOID hEnum; // [in] enumeration token
651 PVOID hEnum; // [in] enumeration token
652 LPTSTR pszServer; // [out] name of server
656 PVOID hServer; // [in] token from BosServerOpen()
657 LPTSTR pszLocal; // [in] filename on local machine
658 LPTSTR pszRemoteDir; // [in] target dir on remote machine
659 } wpBosExecutableCreate;
662 PVOID hServer; // [in] token from BosServerOpen()
663 LPTSTR pszFilename; // [in] filename on remote machine
664 } wpBosExecutableRevert;
667 PVOID hServer; // [in] token from BosServerOpen()
668 LPTSTR pszFilename; // [in] filename on remote machine
669 SYSTEMTIME timeNew; // [out] file's last-modified time
670 SYSTEMTIME timeOld; // [out] .OLD file's last-modified time
671 SYSTEMTIME timeBak; // [out] .BAK file's last-modified time
672 } wpBosExecutableTimestampGet;
675 PVOID hServer; // [in] token from BosServerOpen()
676 BOOL fPruneOld; // [in] TRUE to remove .OLD files
677 BOOL fPruneBak; // [in] TRUE to remove .BAK files
678 BOOL fPruneCore; // [in] TRUE to remove CORE files
679 } wpBosExecutablePrune;
682 PVOID hServer; // [in] token from BosServerOpen()
683 BOOL fWeeklyRestart; // [in] TRUE to enable weekly restart
684 SYSTEMTIME timeWeekly; // [in] new weekly restart time
685 BOOL fDailyRestart; // [in] TRUE to enable weekly restart
686 SYSTEMTIME timeDaily; // [in] new daily restart time
687 } wpBosExecutableRestartTimeSet;
690 PVOID hServer; // [in] token from BosServerOpen()
691 BOOL fWeeklyRestart; // [out] TRUE if doing weekly restart
692 SYSTEMTIME timeWeekly; // [out] weekly restart time
693 BOOL fDailyRestart; // [out] TRUE if doing weekly restart
694 SYSTEMTIME timeDaily; // [out] daily restart time
695 } wpBosExecutableRestartTimeGet;
698 PVOID hServer; // [in] token from BosServerOpen()
699 LPTSTR pszLogName; // [in] name of log file to retrieve
700 LPTSTR pszLogData; // [out] 0-init; GlobalFree() when done
704 PVOID hServer; // [in] token from BosServerOpen()
705 BOOL fEnableAuth; // [in] TRUE to enable auth checking
709 PVOID hServer; // [in] token from BosServerOpen()
710 LPTSTR pszCommand; // [in] command-line to execute
711 } wpBosCommandExecute;
714 PVOID hCell; // [in] token from AdminCellOpen()
715 PVOID hServer; // [in] token from BosServerOpen()
716 LPTSTR pszAggregate; // [in] NULL or aggregate to salvage
717 LPTSTR pszFileset; // [in] NULL or fileset to salvage
718 int nProcesses; // [in] 0 for default (4)
719 LPTSTR pszTempDir; // [in] NULL or temporary directory
720 LPTSTR pszLogFile; // [in] NULL for SalvageLog
721 BOOL fForce; // [in] TRUE to salvage all filesets
722 BOOL fReadonly; // [in] TRUE to only bring up undamaged
723 BOOL fLogInodes; // [in] TRUE to log damaged inodes
724 BOOL fLogRootInodes; // [in] TRUE to log AFS-owned inodes
725 BOOL fRebuildDirs; // [in] TRUE to rebuild dir structure
726 BOOL fReadBlocks; // [in] TRUE to read in small blocks
730 PVOID hCell; // [in] token from AdminCellOpen()
731 char **apszServers; // [in] 0-terminated array, or NULL
732 PVOID hServer; // [out] handle for server(s)
736 PVOID hServer; // [in] token from KasServerOpen()
740 PVOID hCell; // [in] token from AdminCellOpen()
741 PVOID hServer; // [in] token from KasServerOpen()
742 ENCRYPTIONKEY key; // [out] random encryption key
743 } wpKasServerRandomKeyGet;
746 LPTSTR pszCell; // [in] cell name
747 LPTSTR pszString; // [in] string to hash
748 ENCRYPTIONKEY key; // [out] generated encryption key
752 PVOID hCell; // [in] token from AdminCellOpen()
753 PVOID hServer; // [in] token from KasServerOpen()
754 LPTSTR pszPrincipal; // [in] principal name
755 LPTSTR pszInstance; // [in] principal instance or NULL
756 LPTSTR pszPassword; // [in] password for new principal
757 } wpKasPrincipalCreate;
760 PVOID hCell; // [in] token from AdminCellOpen()
761 PVOID hServer; // [in] token from KasServerOpen()
762 LPTSTR pszPrincipal; // [in] principal name
763 LPTSTR pszInstance; // [in] principal instance or NULL
764 } wpKasPrincipalDelete;
767 PVOID hCell; // [in] token from AdminCellOpen()
768 PVOID hServer; // [in] token from KasServerOpen()
769 LPTSTR pszPrincipal; // [in] principal name
770 LPTSTR pszInstance; // [in] principal instance or NULL
771 kas_principalEntry_t Data; // [out] principal information
775 PVOID hCell; // [in] token from AdminCellOpen()
776 PVOID hServer; // [in] token from KasServerOpen()
777 PVOID hEnum; // [out] enumeration token
778 } wpKasPrincipalGetBegin;
781 PVOID hEnum; // [in] enumeration token
782 LPTSTR pszPrincipal; // [out] principal name
783 LPTSTR pszInstance; // [out] principal instance
784 } wpKasPrincipalGetNext;
787 PVOID hEnum; // [in] enumeration token
788 } wpKasPrincipalGetDone;
791 PVOID hCell; // [in] token from AdminCellOpen()
792 PVOID hServer; // [in] token from KasServerOpen()
793 LPTSTR pszPrincipal; // [in] principal name
794 LPTSTR pszInstance; // [in] principal instance or NULL
795 int keyVersion; // [in] key version number
796 ENCRYPTIONKEY key; // [in] encryption key
797 } wpKasPrincipalKeySet;
800 PVOID hCell; // [in] token from AdminCellOpen()
801 PVOID hServer; // [in] token from KasServerOpen()
802 LPTSTR pszPrincipal; // [in] principal name
803 LPTSTR pszInstance; // [in] principal instance or NULL
804 SYSTEMTIME timeUnlocked; // [out] time lock released
805 } wpKasPrincipalLockStatusGet;
808 PVOID hCell; // [in] token from AdminCellOpen()
809 PVOID hServer; // [in] token from KasServerOpen()
810 LPTSTR pszPrincipal; // [in] principal name
811 LPTSTR pszInstance; // [in] principal instance or NULL
812 } wpKasPrincipalUnlock;
815 PVOID hCell; // [in] token from AdminCellOpen()
816 PVOID hServer; // [in] token from KasServerOpen()
817 LPTSTR pszPrincipal; // [in] principal name
818 LPTSTR pszInstance; // [in] principal instance or NULL
819 BOOL fIsAdmin; // [in] TRUE if admin
820 BOOL fGrantTickets; // [in] TRUE if can get tokens
821 BOOL fCanEncrypt; // [in] TRUE if can encrypt
822 BOOL fCanChangePassword; // [in] TRUE if can change password
823 BOOL fCanReusePasswords; // [in] TRUE if can change password
824 SYSTEMTIME timeExpires; // [in] time account expires (or 0's)
825 LONG cdayPwExpires; // [in] days til password expires (or 0)
826 LONG csecTicketLifetime; // [in] ticket expiration timeout
827 LONG nFailureAttempts; // [in] num failures to tolerate (or 0)
828 LONG csecFailedLoginLockTime; // [in] csec to lock account if failed
829 } wpKasPrincipalFieldsSet;
832 PVOID hCell; // [in] token from AdminCellOpen()
833 LPTSTR pszGroup; // [in] group to modify
834 LPTSTR pszUser; // [in] user to add to group
835 } wpPtsGroupMemberAdd;
838 PVOID hCell; // [in] token from AdminCellOpen()
839 LPTSTR pszGroup; // [in] group to modify
840 LPTSTR pszOwner; // [in] new owner for group
841 } wpPtsGroupOwnerChange;
844 PVOID hCell; // [in] token from AdminCellOpen()
845 LPTSTR pszGroup; // [in] group to create
846 LPTSTR pszOwner; // [in] owner for group
847 int idGroup; // [in out] new group ID (or 0)
851 PVOID hCell; // [in] token from AdminCellOpen()
852 LPTSTR pszGroup; // [in] group to query
853 pts_GroupEntry_t Entry; // [out] group information
857 PVOID hCell; // [in] token from AdminCellOpen()
858 LPTSTR pszGroup; // [in] group to remove
862 PVOID hCell; // [in] token from AdminCellOpen()
863 int idGroupMax; // [out] highest current group number
867 PVOID hCell; // [in] token from AdminCellOpen()
868 int idGroupMax; // [in] new highest current group number
872 PVOID hCell; // [in] token from AdminCellOpen()
873 LPTSTR pszGroup; // [in] group to enumerate
874 PVOID hEnum; // [out] enumeration token
875 } wpPtsGroupMemberListBegin;
878 PVOID hEnum; // [in] enumeration token
879 LPTSTR pszMember; // [out] member name
880 } wpPtsGroupMemberListNext;
883 PVOID hEnum; // [in] enumeration token
884 } wpPtsGroupMemberListDone;
887 PVOID hCell; // [in] token from AdminCellOpen()
888 LPTSTR pszGroup; // [in] group to modify
889 LPTSTR pszUser; // [in] member to remove
890 } wpPtsGroupMemberRemove;
893 PVOID hCell; // [in] token from AdminCellOpen()
894 LPTSTR pszGroup; // [in] group to rename
895 LPTSTR pszNewName; // [in] new name for group
899 PVOID hCell; // [in] token from AdminCellOpen()
900 LPTSTR pszGroup; // [in] group to modify
901 pts_GroupUpdateEntry_t Delta; // [in] new properties for group
905 PVOID hCell; // [in] token from AdminCellOpen()
906 LPTSTR pszUser; // [in] name for new user account
907 int idUser; // [in out] new user account ID (or 0)
911 PVOID hCell; // [in] token from AdminCellOpen()
912 LPTSTR pszUser; // [in] user to remove
916 PVOID hCell; // [in] token from AdminCellOpen()
917 LPTSTR pszUser; // [in] user to query
918 pts_UserEntry_t Entry; // [out] user properties
922 PVOID hCell; // [in] token from AdminCellOpen()
923 LPTSTR pszUser; // [in] user to modify
924 LPTSTR pszNewName; // [in] new name for user
928 PVOID hCell; // [in] token from AdminCellOpen()
929 LPTSTR pszUser; // [in] user to modify
930 pts_UserUpdateEntry_t Delta; // [in] new user properties
934 PVOID hCell; // [in] token from AdminCellOpen()
935 int idUserMax; // [out] highest user ID
939 PVOID hCell; // [in] token from AdminCellOpen()
940 int idUserMax; // [in] new highest user ID
944 PVOID hCell; // [in] token from AdminCellOpen()
945 LPTSTR pszUser; // [in] user to query
946 PVOID hEnum; // [out] enumeration token
947 } wpPtsUserMemberListBegin;
950 PVOID hEnum; // [in] enumeration token
951 LPTSTR pszGroup; // [in] group to which user belongs
952 } wpPtsUserMemberListNext;
955 PVOID hEnum; // [in] enumeration token
956 } wpPtsUserMemberListDone;
959 PVOID hCell; // [in] token from AdminCellOpen()
960 LPTSTR pszOwner; // [in] user to query
961 PVOID hEnum; // [out] enumeration token
962 } wpPtsOwnedGroupListBegin;
965 PVOID hEnum; // [in] enumeration token
966 LPTSTR pszGroup; // [in] group which owner owns
967 } wpPtsOwnedGroupListNext;
970 PVOID hEnum; // [in] enumeration token
971 } wpPtsOwnedGroupListDone;
974 LPTSTR pszCell; // [in] cell in which to query
975 PVOID hCreds; // [out] user credentials token
976 } wpClientTokenGetExisting;
979 LPTSTR pszCell; // [in] cell to open
980 PVOID hCreds; // [in] user credentials token
981 PVOID hCell; // [out] cell token
985 PVOID hCell; // [in] cell token
989 LPTSTR pszCell; // [out] local cell name
990 } wpClientLocalCellGet;
993 PVOID hCell; // [in] cell token
994 LPTSTR pszServer; // [in] full name of server to query
995 afs_serverEntry_t Entry; // [out] server information
996 } wpClientAFSServerGet;
999 PVOID hCell; // [in] cell token
1000 PVOID hEnum; // [out] enumeration token
1001 } wpClientAFSServerGetBegin;
1004 PVOID hEnum; // [in] enumeration token
1005 afs_serverEntry_t Entry; // [out] server information
1006 } wpClientAFSServerGetNext;
1009 PVOID hEnum; // [in] enumeration token
1010 } wpClientAFSServerGetDone;
1013 LPTSTR pszCell; // [in] cell name
1014 PVOID hEnum; // [out] enumeration token
1015 } wpUtilDatabaseServerGetBegin;
1018 PVOID hEnum; // [in] enumeration token
1019 SOCKADDR_IN Address; // [out] server address
1020 } wpUtilDatabaseServerGetNext;
1023 PVOID hEnum; // [in] enumeration token
1024 } wpUtilDatabaseServerGetDone;
1028 } WORKERPACKET, *LPWORKERPACKET;
1032 * PROTOTYPES _________________________________________________________________
1036 BOOL Worker_Initialize (ULONG *pStatus = NULL);
1038 BOOL Worker_DoTask (WORKERTASK wtask, LPWORKERPACKET lpwp = NULL, ULONG *pStatus = NULL);