home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 2 / goldfish_vol2_cd1.bin / files / util / misc / multiuser / src / library / passwd.c < prev    next >
C/C++ Source or Header  |  1994-03-07  |  1KB  |  47 lines

  1. /************************************************************
  2. * MultiUser - MultiUser Task/File Support System                *
  3. * ---------------------------------------------------------    *
  4. * Password Management                                                    *
  5. * ---------------------------------------------------------    *
  6. * © Copyright 1993-1994 Geert Uytterhoeven                        *
  7. * All Rights Reserved.                                                    *
  8. ************************************************************/
  9.  
  10.  
  11. #include "Passwd.h"
  12. #include "Server.h"
  13. #include "Misc.h"
  14.  
  15.  
  16.     /*
  17.      *        Change the Password for a User
  18.      *
  19.      *        Public Library Function
  20.      */
  21.  
  22. BOOL __asm __saveds muPasswd(register __a0 STRPTR oldpwd,
  23.                                       register __a1 STRPTR newpwd)
  24. {
  25.     return((BOOL)SendServerPacket(muSAction_Passwd, (LONG)oldpwd, (LONG)newpwd,
  26.                                             NULL, NULL));
  27. }
  28.  
  29.  
  30.     /*
  31.      *        Check the Password of the current User
  32.      *
  33.      *        Public Library Function
  34.      */
  35.  
  36. BOOL __asm __saveds muCheckPasswd(register __a0 struct TagItem *taglist)
  37. {
  38.     struct muTags tags;
  39.  
  40.     InterpreteTagList(taglist, &tags);
  41.     if (tags.Password)
  42.         return((BOOL)SendServerPacket(muSAction_CheckPasswd, (LONG)tags.Password,
  43.                                                 NULL, NULL, NULL));
  44.     else
  45.         return(FALSE);
  46. }
  47.