home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 2 / goldfish_vol2_cd1.bin / files / dev / src / amilock / source / whoami.c < prev   
Encoding:
C/C++ Source or Header  |  1993-07-11  |  556 b   |  30 lines

  1. #include <exec/ports.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include <string.h>
  5.  
  6. #include "headers/global.h"
  7. #include "headers/deamon.h"
  8. #include "headers/talkto_proto.h"
  9.  
  10. static const char __Version[]=WHOAMIVERST;
  11.  
  12. extern struct CurrentUser *ID;
  13.  
  14. main() {
  15.  
  16.     ULONG    Status;
  17.  
  18.     Status = TalkTo(NULL,NULL,NULL,WHOAMI);
  19.     if (!(Status == OK)) {
  20.         printf("Who Am I Failed\n");
  21.     }
  22.     else {
  23.         printf("%s\n",ID->Login);
  24.         printf("%s\n",ID->Name);
  25.         printf("UID %ld GID %ld\n",ID->UID,ID->GID);
  26.         if (!ID->Locks) {
  27.             printf("currently No restrictions\n");
  28.         }
  29.     }
  30. }