Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
3.2 KiB

  1. // ===========================================================================
  2. // UAMKeychain.h � 1999 Microsoft Corp. All rights reserved.
  3. // ===========================================================================
  4. #ifdef UAM_TARGET_CARBON
  5. #include <Carbon/Carbon.h>
  6. #else
  7. #include "Keychain.h"
  8. #endif
  9. #define UAM_KC_DESCRIPTION "\pMicrosoft� Windows Server"
  10. typedef unsigned char Str8[9];
  11. //
  12. //The volume mount info structure must be aligned for 68K
  13. //as the Mac AFP Client as of MacOS 9.0 is still 68K code!
  14. //
  15. #pragma options align=mac68k
  16. typedef struct
  17. {
  18. SInt16 length; /* length of this record */
  19. VolumeType media; /* type of media, always AppleShareMediaType */
  20. SInt16 flags; /* bits for no messages, no reconnect, etc */
  21. char nbpInterval; /* NBP interval parameter; 7 is a good choice */
  22. char nbpCount; /* NBP count parameter; 5 is a good choice */
  23. SInt16 uamType; /* User Authentication Method */
  24. SInt16 zoneNameOffset; /* offset from start of record to zoneName */
  25. SInt16 serverNameOffset; /* offset from start of record to serverName */
  26. SInt16 volNameOffset; /* offset from start of record to volName */
  27. SInt16 userNameOffset; /* offset from start of record to userName */
  28. SInt16 userPasswordOffset; /* offset from start of record to userPassword */
  29. SInt16 volPasswordOffset; /* offset from start of record to volPassword */
  30. SInt16 extendedFlags; /* extended flags word */
  31. SInt16 uamNameOffset; /* offset to a pascal UAM name string */
  32. SInt16 alternateAddressOffset; /* offset to Alternate Addresses in tagged format */
  33. Str32 zoneName; /* server's AppleTalk zone name */
  34. char filler1; /* to word align volPassword */
  35. Str32 serverName; /* server name */
  36. char filler2; /* to word align volPassword */
  37. Str27 volName; /* volume name */
  38. Str31 userName; /* user name (zero length Pascal string for guest) */
  39. Str64 userPassword; /* user password (zero length Pascal string if no user password) */
  40. char filler3; /* to word align volPassword */
  41. Str8 volPassword; /* volume password (zero length Pascal string if no volume password) */
  42. char filler4; /* to word align uamNameOffset */
  43. Str32 uamName; /* UAM name */
  44. char filler5; /* to word align alternateAddress */
  45. char alternateAddress[kVariableLengthArray]; /* AFPAlternateAddress */
  46. }UAM_AFPXVolMountInfo, *PUAM_AFPXVolMountInfo;
  47. #pragma options align=reset
  48. //
  49. //This macro helps us get offsets into the struct above.
  50. //
  51. #define uamx_member_offset(member) ((size_t) &((UAM_AFPXVolMountInfo *) 0)->member)
  52. OSStatus UAM_KCDeleteItem(
  53. StringPtr inUserName,
  54. Str255 inServerName
  55. );
  56. void UAM_KCInitialize(UAMArgs* inUAMArgs);
  57. Boolean UAM_KCAvailable(void);
  58. OSStatus UAM_KCSavePassword(
  59. StringPtr inUserName,
  60. StringPtr inPassword,
  61. Str255 inServerName
  62. );
  63. OSStatus UAM_KCFindAppleSharePassword(
  64. StringPtr inUserName,
  65. StringPtr inPassword,
  66. StringPtr inServerName,
  67. KCItemRef *outItemRef
  68. );
  69. OSStatus UAM_BuildAFPXVolMountInfo(
  70. StringPtr inUserName,
  71. StringPtr inPassword,
  72. Str255 inServerName,
  73. const Str32 inUAMString,
  74. PUAM_AFPXVolMountInfo* outVolInfo
  75. );