4 #include <afs/afs_Admin.h>
5 #include <afs/afs_utilAdmin.h>
6 #include <afs/afs_vosAdmin.h>
7 #include <afs/afs_bosAdmin.h>
8 #include <afs/afs_kasAdmin.h>
9 #include <afs/afs_ptsAdmin.h>
10 #include <afs/afs_clientAdmin.h>
11 #include <afs/pterror.h>
13 #define __KAUTILS__ // prevents including anything but error #s from kautils.h
14 #include <afs/kautils.h>
19 * DEFINITIONS ________________________________________________________________
23 #define NO_PARTITION ((unsigned int)-1)
24 #define NO_VOLUME ((VOLUMEID)-1)
26 typedef enum // WORKERTASK
28 wtaskVosBackupVolumeCreate,
29 wtaskVosBackupVolumeCreateMultiple,
31 wtaskVosPartitionGetBegin,
32 wtaskVosPartitionGetNext,
33 wtaskVosPartitionGetDone,
37 wtaskVosFileServerAddressChange,
38 wtaskVosFileServerAddressRemove,
39 wtaskVosFileServerGetBegin,
40 wtaskVosFileServerGetNext,
41 wtaskVosFileServerGetDone,
42 wtaskVosServerTransactionStatusGetBegin,
43 wtaskVosServerTransactionStatusGetNext,
44 wtaskVosServerTransactionStatusGetDone,
49 wtaskVosVLDBEntryRemove,
50 wtaskVosVLDBEntryLock,
51 wtaskVosVLDBEntryUnlock,
52 wtaskVosVLDBReadOnlySiteCreate,
53 wtaskVosVLDBReadOnlySiteDelete,
59 wtaskVosVolumeRestore,
61 wtaskVosVolumeOffline,
63 wtaskVosVolumeGetBegin,
64 wtaskVosVolumeGetNext,
65 wtaskVosVolumeGetDone,
67 wtaskVosVolumeRelease,
69 wtaskVosPartitionNameToId,
70 wtaskVosPartitionIdToName,
71 wtaskVosVolumeQuotaChange,
74 wtaskBosProcessCreate,
75 wtaskBosProcessDelete,
76 wtaskBosProcessExecutionStateGet,
77 wtaskBosAuxiliaryProcessStatusDeallocate,
78 wtaskBosProcessExecutionStateSet,
79 wtaskBosProcessExecutionStateSetTemporary,
80 wtaskBosProcessNameGetBegin,
81 wtaskBosProcessNameGetDone,
82 wtaskBosProcessNameGetNext,
83 wtaskBosProcessInfoGet,
84 wtaskBosProcessParameterGetBegin,
85 wtaskBosProcessParameterGetDone,
86 wtaskBosProcessParameterGetNext,
87 wtaskBosProcessNotifierGet,
88 wtaskBosProcessRestart,
89 wtaskBosProcessAllStop,
90 wtaskBosProcessAllStart,
91 wtaskBosProcessAllWaitStop,
92 wtaskBosProcessAllStopAndRestart,
95 wtaskBosAdminGetBegin,
107 wtaskBosHostGetBegin,
110 wtaskBosExecutableCreate,
111 wtaskBosExecutableRevert,
112 wtaskBosExecutableTimestampGet,
113 wtaskBosExecutablePrune,
114 wtaskBosExecutableRestartTimeSet,
115 wtaskBosExecutableRestartTimeGet,
118 wtaskBosCommandExecute,
122 wtaskKasServerRandomKeyGet,
124 wtaskKasPrincipalCreate,
125 wtaskKasPrincipalDelete,
126 wtaskKasPrincipalGet,
127 wtaskKasPrincipalGetBegin,
128 wtaskKasPrincipalGetNext,
129 wtaskKasPrincipalGetDone,
130 wtaskKasPrincipalKeySet,
131 wtaskKasPrincipalLockStatusGet,
132 wtaskKasPrincipalUnlock,
133 wtaskKasPrincipalFieldsSet,
134 wtaskPtsGroupMemberAdd,
135 wtaskPtsGroupOwnerChange,
141 wtaskPtsGroupMemberListBegin,
142 wtaskPtsGroupMemberListNext,
143 wtaskPtsGroupMemberListDone,
144 wtaskPtsGroupMemberRemove,
154 wtaskPtsUserMemberListBegin,
155 wtaskPtsUserMemberListNext,
156 wtaskPtsUserMemberListDone,
157 wtaskPtsOwnedGroupListBegin,
158 wtaskPtsOwnedGroupListNext,
159 wtaskPtsOwnedGroupListDone,
160 wtaskClientTokenGetExisting,
162 wtaskClientCellClose,
163 wtaskClientLocalCellGet,
164 wtaskClientAFSServerGet,
165 wtaskClientAFSServerGetBegin,
166 wtaskClientAFSServerGetNext,
167 wtaskClientAFSServerGetDone,
168 wtaskUtilDatabaseServerGetBegin,
169 wtaskUtilDatabaseServerGetNext,
170 wtaskUtilDatabaseServerGetDone,
174 typedef union // WORKERPACKET
178 PVOID hCell; // [in] token from AdminCellOpen()
179 VOLUMEID idVolume; // [in] id of read/write volume
180 } wpVosBackupVolumeCreate;
183 PVOID hCell; // [in] token from AdminCellOpen()
184 PVOID hServer; // [in] server token (or NULL)
185 int idPartition; // [in] partition ID (or NO_PARTITION)
186 LPTSTR pszPrefix; // [in] volume prefix to match (or NULL)
187 BOOL fExclude; // [in] TRUE if prefix is exclusionary
188 } wpVosBackupVolumeCreateMultiple;
191 PVOID hCell; // [in] token from AdminCellOpen()
192 PVOID hServer; // [in] token from VosServerOpen()
193 int idPartition; // [in] partition ID
194 vos_partitionEntry_t Data; // [out] partition properties
198 PVOID hCell; // [in] token from AdminCellOpen()
199 PVOID hServer; // [in] token from VosServerOpen()
200 PVOID hEnum; // [out] enumeration token
201 } wpVosPartitionGetBegin;
204 PVOID hEnum; // [in] enumeration token
205 vos_partitionEntry_t Data; // [out] partition properties
206 } wpVosPartitionGetNext;
209 PVOID hEnum; // [in] enumeration token
210 } wpVosPartitionGetDone;
213 PVOID hCell; // [in] token from AdminCellOpen()
214 LPTSTR pszServer; // [in] server name
215 PVOID hServer; // [out] server token
219 PVOID hServer; // [in] token from VosServerOpen()
223 PVOID hCell; // [in] token from AdminCellOpen()
224 PVOID hServer; // [in] token from VosServerOpen()
225 int idPartition; // [in] partition ID (or NO_PARTITION)
226 BOOL fForce; // [in] TRUE to force sync
230 PVOID hCell; // [in] token from AdminCellOpen()
231 SOCKADDR_IN addrOld; // [in] old address (or 0's to add new)
232 SOCKADDR_IN addrNew; // [in] new address (or 0's to del old)
233 } wpVosFileServerAddressChange;
236 PVOID hCell; // [in] token from AdminCellOpen()
237 SOCKADDR_IN addr; // [in] address to remove
238 } wpVosFileServerAddressRemove;
241 PVOID hCell; // [in] token from AdminCellOpen()
242 PVOID hEnum; // [out] enumeration token
243 } wpVosFileServerGetBegin;
246 PVOID hEnum; // [in] enumeration token
247 vos_fileServerEntry_t Entry; // [out] server entry (with addresses)
248 } wpVosFileServerGetNext;
251 PVOID hEnum; // [in] enumeration token
252 } wpVosFileServerGetDone;
255 PVOID hCell; // [in] token from AdminCellOpen()
256 PVOID hServer; // [in] token from VosServerOpen()
257 PVOID hEnum; // [out] enumeration token
258 } wpVosServerTransactionStatusGetBegin;
261 PVOID hEnum; // [in] enumeration token
262 vos_serverTransactionStatus_t Data; // [out] transaction information
263 } wpVosServerTransactionStatusGetNext;
266 PVOID hEnum; // [in] enumeration token
267 } wpVosServerTransactionStatusGetDone;
270 PVOID hCell; // [in] token from AdminCellOpen()
271 VOLUMEID idVolume; // [in] read/write volume ID
272 vos_vldbEntry_t Data; // [out] VLDB entry
276 PVOID hCell; // [in] token from AdminCellOpen()
277 PVOID hServer; // [in] server token (or NULL)
278 int idPartition; // [in] partition ID (or NO_PARTITION)
279 PVOID hEnum; // [out] enumeration token
283 PVOID hEnum; // [in] enumeration token
284 vos_vldbEntry_t Data; // [out] VLDB entry
288 PVOID hEnum; // [in] enumeration token
292 PVOID hCell; // [in] token from AdminCellOpen()
293 PVOID hServer; // [in] server token (or NULL)
294 int idPartition; // [in] partition ID (or NO_PARTITION)
295 VOLUMEID idVolume; // [in] read/write volume ID
296 } wpVosVLDBEntryRemove;
299 PVOID hCell; // [in] token from AdminCellOpen()
300 VOLUMEID idVolume; // [in] read/write volume ID
301 } wpVosVLDBEntryLock;
304 PVOID hCell; // [in] token from AdminCellOpen()
305 PVOID hServer; // [in] server token (or NULL)
306 int idPartition; // [in] partition ID (or NO_PARTITION)
307 VOLUMEID idVolume; // [in] read/write volume ID
308 } wpVosVLDBEntryUnlock;
311 PVOID hCell; // [in] token from AdminCellOpen()
312 PVOID hServer; // [in] token from VosServerOpen()
313 int idPartition; // [in] partition ID
314 VOLUMEID idVolume; // [in] read/write volume ID
315 } wpVosVLDBReadOnlySiteCreate;
318 PVOID hCell; // [in] token from AdminCellOpen()
319 PVOID hServer; // [in] token from VosServerOpen()
320 int idPartition; // [in] partition ID
321 VOLUMEID idVolume; // [in] read/write volume ID
322 } wpVosVLDBReadOnlySiteDelete;
325 PVOID hCell; // [in] token from AdminCellOpen()
326 PVOID hServer; // [in] token from VosServerOpen()
327 int idPartition; // [in] partition ID (or NO_PARTITION)
328 BOOL fForce; // [in] TRUE to force sync
332 PVOID hCell; // [in] token from AdminCellOpen()
333 PVOID hServer; // [in] token from VosServerOpen()
334 int idPartition; // [in] partition ID
335 LPTSTR pszVolume; // [in] volume name
336 ULONG ckQuota; // [in] initial quota
337 VOLUMEID idVolume; // [out] volume ID
341 PVOID hCell; // [in] token from AdminCellOpen()
342 PVOID hServer; // [in] token from VosServerOpen()
343 int idPartition; // [in] partition ID
344 VOLUMEID idVolume; // [in] volume ID
348 PVOID hCell; // [in] token from AdminCellOpen()
349 VOLUMEID idVolume; // [in] read/write volume ID
350 LPTSTR pszVolume; // [in] new volume name
354 PVOID hCell; // [in] token from AdminCellOpen()
355 PVOID hServer; // [in] token from VosServerOpen()
356 int idPartition; // [in] parition ID
357 VOLUMEID idVolume; // [in] volume ID
358 SYSTEMTIME stStart; // [in] start time
359 LPTSTR pszFilename; // [in] target filename (local)
363 PVOID hCell; // [in] token from AdminCellOpen()
364 PVOID hServer; // [in] token from VosServerOpen()
365 int idPartition; // [in] partition ID
366 VOLUMEID idVolume; // [in] read/write volume ID (or 0)
367 LPTSTR pszVolume; // [in] new volume name (or NULL)
368 LPTSTR pszFilename; // [in] source filename (local)
369 BOOL fIncremental; // [in] TRUE if restoring inc backup
370 } wpVosVolumeRestore;
373 PVOID hServer; // [in] token from VosServerOpen()
374 int idPartition; // [in] partition ID
375 VOLUMEID idVolume; // [in] read/write volume ID (or 0)
376 int csecSleep; // [in] sleep time
377 vos_volumeOnlineType_t Status; // [in] new status to indicate
381 PVOID hServer; // [in] token from VosServerOpen()
382 int idPartition; // [in] partition ID
383 VOLUMEID idVolume; // [in] volume ID
384 } wpVosVolumeOffline;
387 PVOID hCell; // [in] token from AdminCellOpen()
388 PVOID hServer; // [in] token from VosServerOpen()
389 int idPartition; // [in] partition ID
390 VOLUMEID idVolume; // [in] volume ID
391 vos_volumeEntry_t Data; // [out] volume properties
395 PVOID hCell; // [in] token from AdminCellOpen()
396 PVOID hServer; // [in] token from VosServerOpen()
397 int idPartition; // [in] partition ID
398 PVOID hEnum; // [out] enumeration token
399 } wpVosVolumeGetBegin;
402 PVOID hEnum; // [in] enumeration token
403 vos_volumeEntry_t Data; // [out] volume properties
404 } wpVosVolumeGetNext;
407 PVOID hEnum; // [in] enumeration token
408 } wpVosVolumeGetDone;
411 PVOID hCell; // [in] token from AdminCellOpen()
412 PVOID hServerFrom; // [in] source server token
413 int idPartitionFrom; // [in] source partition ID
414 PVOID hServerTo; // [in] target server token
415 int idPartitionTo; // [in] target partition ID
416 VOLUMEID idVolume; // [in] read/write volume ID
420 PVOID hCell; // [in] token from AdminCellOpen()
421 VOLUMEID idVolume; // [in] read/write volume ID
422 BOOL fForce; // [in] TRUE to force release
423 } wpVosVolumeRelease;
426 PVOID hCell; // [in] token from AdminCellOpen()
427 PVOID hServer; // [in] token from VosServerOpen()
428 int idPartition; // [in] partition ID
429 VOLUMEID idVolume; // [in] volume ID
430 BOOL fForce; // [in] TRUE to force delete
434 LPTSTR pszPartition; // [in] partition name
435 int idPartition; // [out] partition ID
436 } wpVosPartitionNameToId;
439 int idPartition; // [in] partition ID
440 LPTSTR pszPartition; // [out] partition name
441 } wpVosPartitionIdToName;
444 PVOID hCell; // [in] token from AdminCellOpen()
445 PVOID hServer; // [in] token from VosServerOpen()
446 int idPartition; // [in] partition ID
447 VOLUMEID idVolume; // [in] id of read/write volume
448 ULONG ckQuota; // [in] new quota
449 } wpVosVolumeQuotaChange;
452 PVOID hCell; // [in] token from AdminCellOpen()
453 LPTSTR pszServer; // [in] name of server to open
454 PVOID hServer; // [out] handle for server
458 PVOID hServer; // [in] token from BosServerOpen()
462 PVOID hServer; // [in] token from BosServerOpen()
463 LPTSTR pszService; // [in] name of new service
464 SERVICETYPE type; // [in] service type (stCRON, stFS, etc)
465 LPTSTR pszCommand; // [in] full command-line to execute
466 LPTSTR pszTimeCron; // [in] date/time (CRON only)
467 LPTSTR pszNotifier; // [in] command executed on exit
468 } wpBosProcessCreate;
471 PVOID hServer; // [in] token from BosServerOpen()
472 LPTSTR pszService; // [in] service name
473 } wpBosProcessDelete;
476 PVOID hServer; // [in] token from BosServerOpen()
477 LPTSTR pszService; // [in] service name
478 SERVICESTATE state; // [out] current execution state
479 LPTSTR pszAuxStatus; // [out] additional status information
480 } wpBosProcessExecutionStateGet;
483 char *pszAuxStatusA; // [in] service string
484 } wpBosAuxiliaryProcessStatusDeallocate;
487 PVOID hServer; // [in] token from BosServerOpen()
488 LPTSTR pszService; // [in] service name
489 SERVICESTATE state; // [in] desired new service state
490 } wpBosProcessExecutionStateSet;
493 PVOID hServer; // [in] token from BosServerOpen()
494 LPTSTR pszService; // [in] service name
495 SERVICESTATE state; // [in] desired new service state
496 } wpBosProcessExecutionStateSetTemporary;
499 PVOID hServer; // [in] token from BosServerOpen()
500 PVOID hEnum; // [out] enumeration token
501 } wpBosProcessNameGetBegin;
504 PVOID hEnum; // [in] enumeration token
505 } wpBosProcessNameGetDone;
508 PVOID hEnum; // [in] enumeration token
509 LPTSTR pszService; // [in] service name
510 } wpBosProcessNameGetNext;
513 PVOID hServer; // [in] token from BosServerOpen()
514 LPTSTR pszService; // [in] service name
515 SERVICESTATUS ss; // [out] service properties
516 } wpBosProcessInfoGet;
519 PVOID hServer; // [in] token from BosServerOpen()
520 LPTSTR pszService; // [in] service name
521 PVOID hEnum; // [out] enumeration token
522 } wpBosProcessParameterGetBegin;
525 PVOID hEnum; // [in] enumeration token
526 } wpBosProcessParameterGetDone;
529 PVOID hEnum; // [in] enumeration token
530 LPTSTR pszParam; // [out] parameter
531 } wpBosProcessParameterGetNext;
534 PVOID hServer; // [in] token from BosServerOpen()
535 LPTSTR pszService; // [in] service name
536 LPTSTR pszNotifier; // [out] current notifier command
537 } wpBosProcessNotifierGet;
540 PVOID hServer; // [in] token from BosServerOpen()
541 LPTSTR pszService; // [in] service name
542 } wpBosProcessRestart;
545 PVOID hServer; // [in] token from BosServerOpen()
546 } wpBosProcessAllStop;
549 PVOID hServer; // [in] token from BosServerOpen()
550 } wpBosProcessAllStart;
553 PVOID hServer; // [in] token from BosServerOpen()
554 } wpBosProcessAllWaitStop;
557 PVOID hServer; // [in] token from BosServerOpen()
558 BOOL fRestartBOS; // [in] TRUE to also restart BOS
559 } wpBosProcessAllStopAndRestart;
562 PVOID hServer; // [in] token from BosServerOpen()
563 LPTSTR pszAdmin; // [in] administrator name
567 PVOID hServer; // [in] token from BosServerOpen()
568 LPTSTR pszAdmin; // [in] administrator name
572 PVOID hServer; // [in] token from BosServerOpen()
573 PVOID hEnum; // [out] enumeration token
574 } wpBosAdminGetBegin;
577 PVOID hEnum; // [in] enumeration token
581 PVOID hEnum; // [in] enumeration token
582 LPTSTR pszAdmin; // [out] administrator name
586 PVOID hServer; // [in] token from BosServerOpen()
587 ENCRYPTIONKEY key; // [in] encryption key to add
588 int keyVersion; // [in] version of new key
592 PVOID hServer; // [in] token from BosServerOpen()
593 int keyVersion; // [in] key version number to delete
597 PVOID hServer; // [in] token from BosServerOpen()
598 PVOID hEnum; // [out] enumeration token
602 PVOID hEnum; // [in] enumeration token
606 PVOID hEnum; // [in] enumeration token
607 int keyVersion; // [out] key version number
608 ENCRYPTIONKEY keyData; // [out] encryption key
609 ENCRYPTIONKEYINFO keyInfo; // [out] additional key information
613 PVOID hServer; // [in] token from BosServerOpen()
614 LPTSTR pszCell; // [in] cell name to assign
618 PVOID hServer; // [in] token from BosServerOpen()
619 LPTSTR pszCell; // [out] currently-assigned cell name
623 PVOID hServer; // [in] token from BosServerOpen()
624 LPTSTR pszServer; // [in] name of server to create
628 PVOID hServer; // [in] token from BosServerOpen()
629 LPTSTR pszServer; // [in] name of server to remove
633 PVOID hServer; // [in] token from BosServerOpen()
634 PVOID hEnum; // [out] enumeration token
638 PVOID hEnum; // [in] enumeration token
642 PVOID hEnum; // [in] enumeration token
643 LPTSTR pszServer; // [out] name of server
647 PVOID hServer; // [in] token from BosServerOpen()
648 LPTSTR pszLocal; // [in] filename on local machine
649 LPTSTR pszRemoteDir; // [in] target dir on remote machine
650 } wpBosExecutableCreate;
653 PVOID hServer; // [in] token from BosServerOpen()
654 LPTSTR pszFilename; // [in] filename on remote machine
655 } wpBosExecutableRevert;
658 PVOID hServer; // [in] token from BosServerOpen()
659 LPTSTR pszFilename; // [in] filename on remote machine
660 SYSTEMTIME timeNew; // [out] file's last-modified time
661 SYSTEMTIME timeOld; // [out] .OLD file's last-modified time
662 SYSTEMTIME timeBak; // [out] .BAK file's last-modified time
663 } wpBosExecutableTimestampGet;
666 PVOID hServer; // [in] token from BosServerOpen()
667 BOOL fPruneOld; // [in] TRUE to remove .OLD files
668 BOOL fPruneBak; // [in] TRUE to remove .BAK files
669 BOOL fPruneCore; // [in] TRUE to remove CORE files
670 } wpBosExecutablePrune;
673 PVOID hServer; // [in] token from BosServerOpen()
674 BOOL fWeeklyRestart; // [in] TRUE to enable weekly restart
675 SYSTEMTIME timeWeekly; // [in] new weekly restart time
676 BOOL fDailyRestart; // [in] TRUE to enable weekly restart
677 SYSTEMTIME timeDaily; // [in] new daily restart time
678 } wpBosExecutableRestartTimeSet;
681 PVOID hServer; // [in] token from BosServerOpen()
682 BOOL fWeeklyRestart; // [out] TRUE if doing weekly restart
683 SYSTEMTIME timeWeekly; // [out] weekly restart time
684 BOOL fDailyRestart; // [out] TRUE if doing weekly restart
685 SYSTEMTIME timeDaily; // [out] daily restart time
686 } wpBosExecutableRestartTimeGet;
689 PVOID hServer; // [in] token from BosServerOpen()
690 LPTSTR pszLogName; // [in] name of log file to retrieve
691 LPTSTR pszLogData; // [out] 0-init; GlobalFree() when done
695 PVOID hServer; // [in] token from BosServerOpen()
696 BOOL fEnableAuth; // [in] TRUE to enable auth checking
700 PVOID hServer; // [in] token from BosServerOpen()
701 LPTSTR pszCommand; // [in] command-line to execute
702 } wpBosCommandExecute;
705 PVOID hCell; // [in] token from AdminCellOpen()
706 PVOID hServer; // [in] token from BosServerOpen()
707 LPTSTR pszAggregate; // [in] NULL or aggregate to salvage
708 LPTSTR pszFileset; // [in] NULL or fileset to salvage
709 int nProcesses; // [in] 0 for default (4)
710 LPTSTR pszTempDir; // [in] NULL or temporary directory
711 LPTSTR pszLogFile; // [in] NULL for SalvageLog
712 BOOL fForce; // [in] TRUE to salvage all filesets
713 BOOL fReadonly; // [in] TRUE to only bring up undamaged
714 BOOL fLogInodes; // [in] TRUE to log damaged inodes
715 BOOL fLogRootInodes; // [in] TRUE to log AFS-owned inodes
716 BOOL fRebuildDirs; // [in] TRUE to rebuild dir structure
717 BOOL fReadBlocks; // [in] TRUE to read in small blocks
721 PVOID hCell; // [in] token from AdminCellOpen()
722 char **apszServers; // [in] 0-terminated array, or NULL
723 PVOID hServer; // [out] handle for server(s)
727 PVOID hServer; // [in] token from KasServerOpen()
731 PVOID hCell; // [in] token from AdminCellOpen()
732 PVOID hServer; // [in] token from KasServerOpen()
733 ENCRYPTIONKEY key; // [out] random encryption key
734 } wpKasServerRandomKeyGet;
737 LPTSTR pszCell; // [in] cell name
738 LPTSTR pszString; // [in] string to hash
739 ENCRYPTIONKEY key; // [out] generated encryption key
743 PVOID hCell; // [in] token from AdminCellOpen()
744 PVOID hServer; // [in] token from KasServerOpen()
745 LPTSTR pszPrincipal; // [in] principal name
746 LPTSTR pszInstance; // [in] principal instance or NULL
747 LPTSTR pszPassword; // [in] password for new principal
748 } wpKasPrincipalCreate;
751 PVOID hCell; // [in] token from AdminCellOpen()
752 PVOID hServer; // [in] token from KasServerOpen()
753 LPTSTR pszPrincipal; // [in] principal name
754 LPTSTR pszInstance; // [in] principal instance or NULL
755 } wpKasPrincipalDelete;
758 PVOID hCell; // [in] token from AdminCellOpen()
759 PVOID hServer; // [in] token from KasServerOpen()
760 LPTSTR pszPrincipal; // [in] principal name
761 LPTSTR pszInstance; // [in] principal instance or NULL
762 kas_principalEntry_t Data; // [out] principal information
766 PVOID hCell; // [in] token from AdminCellOpen()
767 PVOID hServer; // [in] token from KasServerOpen()
768 PVOID hEnum; // [out] enumeration token
769 } wpKasPrincipalGetBegin;
772 PVOID hEnum; // [in] enumeration token
773 LPTSTR pszPrincipal; // [out] principal name
774 LPTSTR pszInstance; // [out] principal instance
775 } wpKasPrincipalGetNext;
778 PVOID hEnum; // [in] enumeration token
779 } wpKasPrincipalGetDone;
782 PVOID hCell; // [in] token from AdminCellOpen()
783 PVOID hServer; // [in] token from KasServerOpen()
784 LPTSTR pszPrincipal; // [in] principal name
785 LPTSTR pszInstance; // [in] principal instance or NULL
786 int keyVersion; // [in] key version number
787 ENCRYPTIONKEY key; // [in] encryption key
788 } wpKasPrincipalKeySet;
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 SYSTEMTIME timeUnlocked; // [out] time lock released
796 } wpKasPrincipalLockStatusGet;
799 PVOID hCell; // [in] token from AdminCellOpen()
800 PVOID hServer; // [in] token from KasServerOpen()
801 LPTSTR pszPrincipal; // [in] principal name
802 LPTSTR pszInstance; // [in] principal instance or NULL
803 } wpKasPrincipalUnlock;
806 PVOID hCell; // [in] token from AdminCellOpen()
807 PVOID hServer; // [in] token from KasServerOpen()
808 LPTSTR pszPrincipal; // [in] principal name
809 LPTSTR pszInstance; // [in] principal instance or NULL
810 BOOL fIsAdmin; // [in] TRUE if admin
811 BOOL fGrantTickets; // [in] TRUE if can get tokens
812 BOOL fCanEncrypt; // [in] TRUE if can encrypt
813 BOOL fCanChangePassword; // [in] TRUE if can change password
814 BOOL fCanReusePasswords; // [in] TRUE if can change password
815 SYSTEMTIME timeExpires; // [in] time account expires (or 0's)
816 LONG cdayPwExpires; // [in] days til password expires (or 0)
817 LONG csecTicketLifetime; // [in] ticket expiration timeout
818 LONG nFailureAttempts; // [in] num failures to tolerate (or 0)
819 LONG csecFailedLoginLockTime; // [in] csec to lock account if failed
820 } wpKasPrincipalFieldsSet;
823 PVOID hCell; // [in] token from AdminCellOpen()
824 LPTSTR pszGroup; // [in] group to modify
825 LPTSTR pszUser; // [in] user to add to group
826 } wpPtsGroupMemberAdd;
829 PVOID hCell; // [in] token from AdminCellOpen()
830 LPTSTR pszGroup; // [in] group to modify
831 LPTSTR pszOwner; // [in] new owner for group
832 } wpPtsGroupOwnerChange;
835 PVOID hCell; // [in] token from AdminCellOpen()
836 LPTSTR pszGroup; // [in] group to create
837 LPTSTR pszOwner; // [in] owner for group
838 int idGroup; // [in out] new group ID (or 0)
842 PVOID hCell; // [in] token from AdminCellOpen()
843 LPTSTR pszGroup; // [in] group to query
844 pts_GroupEntry_t Entry; // [out] group information
848 PVOID hCell; // [in] token from AdminCellOpen()
849 LPTSTR pszGroup; // [in] group to remove
853 PVOID hCell; // [in] token from AdminCellOpen()
854 int idGroupMax; // [out] highest current group number
858 PVOID hCell; // [in] token from AdminCellOpen()
859 int idGroupMax; // [in] new highest current group number
863 PVOID hCell; // [in] token from AdminCellOpen()
864 LPTSTR pszGroup; // [in] group to enumerate
865 PVOID hEnum; // [out] enumeration token
866 } wpPtsGroupMemberListBegin;
869 PVOID hEnum; // [in] enumeration token
870 LPTSTR pszMember; // [out] member name
871 } wpPtsGroupMemberListNext;
874 PVOID hEnum; // [in] enumeration token
875 } wpPtsGroupMemberListDone;
878 PVOID hCell; // [in] token from AdminCellOpen()
879 LPTSTR pszGroup; // [in] group to modify
880 LPTSTR pszUser; // [in] member to remove
881 } wpPtsGroupMemberRemove;
884 PVOID hCell; // [in] token from AdminCellOpen()
885 LPTSTR pszGroup; // [in] group to rename
886 LPTSTR pszNewName; // [in] new name for group
890 PVOID hCell; // [in] token from AdminCellOpen()
891 LPTSTR pszGroup; // [in] group to modify
892 pts_GroupUpdateEntry_t Delta; // [in] new properties for group
896 PVOID hCell; // [in] token from AdminCellOpen()
897 LPTSTR pszUser; // [in] name for new user account
898 int idUser; // [in out] new user account ID (or 0)
902 PVOID hCell; // [in] token from AdminCellOpen()
903 LPTSTR pszUser; // [in] user to remove
907 PVOID hCell; // [in] token from AdminCellOpen()
908 LPTSTR pszUser; // [in] user to query
909 pts_UserEntry_t Entry; // [out] user properties
913 PVOID hCell; // [in] token from AdminCellOpen()
914 LPTSTR pszUser; // [in] user to modify
915 LPTSTR pszNewName; // [in] new name for user
919 PVOID hCell; // [in] token from AdminCellOpen()
920 LPTSTR pszUser; // [in] user to modify
921 pts_UserUpdateEntry_t Delta; // [in] new user properties
925 PVOID hCell; // [in] token from AdminCellOpen()
926 int idUserMax; // [out] highest user ID
930 PVOID hCell; // [in] token from AdminCellOpen()
931 int idUserMax; // [in] new highest user ID
935 PVOID hCell; // [in] token from AdminCellOpen()
936 LPTSTR pszUser; // [in] user to query
937 PVOID hEnum; // [out] enumeration token
938 } wpPtsUserMemberListBegin;
941 PVOID hEnum; // [in] enumeration token
942 LPTSTR pszGroup; // [in] group to which user belongs
943 } wpPtsUserMemberListNext;
946 PVOID hEnum; // [in] enumeration token
947 } wpPtsUserMemberListDone;
950 PVOID hCell; // [in] token from AdminCellOpen()
951 LPTSTR pszOwner; // [in] user to query
952 PVOID hEnum; // [out] enumeration token
953 } wpPtsOwnedGroupListBegin;
956 PVOID hEnum; // [in] enumeration token
957 LPTSTR pszGroup; // [in] group which owner owns
958 } wpPtsOwnedGroupListNext;
961 PVOID hEnum; // [in] enumeration token
962 } wpPtsOwnedGroupListDone;
965 LPTSTR pszCell; // [in] cell in which to query
966 PVOID hCreds; // [out] user credentials token
967 } wpClientTokenGetExisting;
970 LPTSTR pszCell; // [in] cell to open
971 PVOID hCreds; // [in] user credentials token
972 PVOID hCell; // [out] cell token
976 PVOID hCell; // [in] cell token
980 LPTSTR pszCell; // [out] local cell name
981 } wpClientLocalCellGet;
984 PVOID hCell; // [in] cell token
985 LPTSTR pszServer; // [in] full name of server to query
986 afs_serverEntry_t Entry; // [out] server information
987 } wpClientAFSServerGet;
990 PVOID hCell; // [in] cell token
991 PVOID hEnum; // [out] enumeration token
992 } wpClientAFSServerGetBegin;
995 PVOID hEnum; // [in] enumeration token
996 afs_serverEntry_t Entry; // [out] server information
997 } wpClientAFSServerGetNext;
1000 PVOID hEnum; // [in] enumeration token
1001 } wpClientAFSServerGetDone;
1004 LPTSTR pszCell; // [in] cell name
1005 PVOID hEnum; // [out] enumeration token
1006 } wpUtilDatabaseServerGetBegin;
1009 PVOID hEnum; // [in] enumeration token
1010 SOCKADDR_IN Address; // [out] server address
1011 } wpUtilDatabaseServerGetNext;
1014 PVOID hEnum; // [in] enumeration token
1015 } wpUtilDatabaseServerGetDone;
1019 } WORKERPACKET, *LPWORKERPACKET;
1023 * PROTOTYPES _________________________________________________________________
1027 BOOL Worker_Initialize (ULONG *pStatus = NULL);
1029 BOOL Worker_DoTask (WORKERTASK wtask, LPWORKERPACKET lpwp = NULL, ULONG *pStatus = NULL);