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.

72 lines
1.8 KiB

  1. package Win32::AuthenticateUser;
  2. use strict;
  3. use Carp;
  4. use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
  5. require Exporter;
  6. require DynaLoader;
  7. require AutoLoader;
  8. @ISA = qw(Exporter DynaLoader);
  9. # Items to export into callers namespace by default. Note: do not export
  10. # names by default without a very good reason. Use EXPORT_OK instead.
  11. # Do not simply export all your public functions/methods/constants.
  12. @EXPORT = qw(AuthenticateUser);
  13. $VERSION = '0.02';
  14. sub AUTOLOAD {
  15. # This AUTOLOAD is used to 'autoload' constants from the constant()
  16. # XS function. If a constant is not found then control is passed
  17. # to the AUTOLOAD in AutoLoader.
  18. my $constname;
  19. ($constname = $AUTOLOAD) =~ s/.*:://;
  20. croak "& not defined" if $constname eq 'constant';
  21. my $val = constant($constname, @_ ? $_[0] : 0);
  22. if ($! != 0) {
  23. if ($! =~ /Invalid/) {
  24. $AutoLoader::AUTOLOAD = $AUTOLOAD;
  25. goto &AutoLoader::AUTOLOAD;
  26. }
  27. else {
  28. croak "Your vendor has not defined Win32::AuthenticateUser macro $constname";
  29. }
  30. }
  31. no strict 'refs';
  32. *$AUTOLOAD = sub () { $val };
  33. goto &$AUTOLOAD;
  34. }
  35. bootstrap Win32::AuthenticateUser $VERSION;
  36. 1;
  37. __END__
  38. =head1 NAME
  39. Win32::AuthenticateUser - Win32 User authentication for domains
  40. =head1 SYNOPSIS
  41. use Win32::AuthenticateUser;
  42. AuthenticateUser("domain", "user", "passwd");
  43. =head1 DESCRIPTION
  44. Performs Win32 user authentication using domains
  45. =head1 STATUS
  46. This module is incomplete and is not being actively developed.
  47. No documentation exists (yet), and there may be bugs in the code.
  48. ActiveState provides no support for this module.
  49. =head1 AUTHOR
  50. Murray Nesbitt E<lt>F<[email protected]>E<gt>, ActiveState Tool Corp.
  51. =cut