home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0210 - 0219 / ibm0210-0219 / ibm0213.tar / ibm0213 / LS4APWAD.ZIP / LS40A.A12 / IBMLSA / IBM400R2 / OSLANAPI.ZIP / IBMLAN / NETSRC / H / UPM.H < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-10  |  15.2 KB  |  442 lines

  1. /**************************************************************************
  2.  
  3.    Module Name    = UPM.H
  4.  
  5.    Descriptive Name = User Profile Management Include file
  6.  
  7.    (C) Copyright IBM Corporation 1988, 1992.  All rights reserved.
  8.    (C) Copyright Microsoft Corporation 1988, 1991.  All rights reserved.
  9.    Licensed Material - Program Property of IBM
  10.  
  11.    Function = Include File defining Api Logon/Logoff
  12.  
  13.    Operating System = OS/2
  14.  
  15. **************************************************************************/
  16.  
  17. /**INTERNAL_ONLY**/
  18. /*
  19. *
  20. *    IMPORTANT!  IMPORTANT! IMPORTANT! IMPORTANT! IMPORTANT! IMPORTANT!
  21. *    READ THIS FIRST BEFORE MAKING ANY CHANGES
  22. *
  23. *    This file was modified to provide support for 32-bit code.
  24. *
  25. *    Any 32-bit module that includes this header file must define
  26. *    the constant INCL_32.
  27. *
  28. *    Do not add any keywords like far, pascal, etc. which are not
  29. *    recognized by the 32-bit compiler. The constants defined below
  30. *    must be used to replace these keywords.
  31. *
  32. *    #ifdef INCL_32    ( defined by 32-bit apps )
  33. *        #define LSFAR
  34. *        #define LSPAS
  35. *        #define LSPTR  _Seg16
  36. *        #define LSINT  short
  37. *    #else                 ( for 16-bit apps )
  38. *        #define LSFAR  far
  39. *        #define LSPAS  pascal
  40. *        #define LSPTR
  41. *        #define LSINT  int
  42. *    #endif
  43. *
  44. */
  45. /**END_INTERNAL**/
  46.  
  47. #ifdef  INCL_32
  48.   #pragma pack(1)
  49.   #define LSFAR
  50.   #define LSPAS
  51.   #define LSPTR  _Seg16
  52.   #define LSINT  short
  53. #else
  54.   #define LSFAR  far
  55.   #define LSPAS  pascal
  56.   #define LSPTR
  57.   #define LSINT  int
  58. #endif
  59.  
  60. #define upmelgn  UPMELGN
  61. #define upmelgff UPMELGFF
  62. #define upmelocu UPMELOCU
  63. #define upmelocl UPMELOCL
  64. #define upmeulgn UPMEULGN
  65. #define upmeulgf UPMEULGF
  66. #define upmeusrl UPMEUSRL
  67. #define upmesetp UPMESETP
  68. #define upmegetp UPMEGETP
  69. #define upmglgn  UPMGLGN
  70. #define upmgulgn UPMGULGN
  71. #define upmglgff UPMGLGFF
  72. #define upmgulgf UPMGULGF
  73. #define upmglocu UPMGLOCU
  74. #define upmglocl UPMGLOCL
  75. #define upmgusrl UPMGUSRL
  76.  
  77. /**INTERNAL_ONLY**/
  78.  
  79. /* Undocumented Function */
  80.  
  81. #define upmenpw  UPMENPW
  82.  
  83. /**END_INTERNAL**/
  84.  
  85. /* The following QUEUE definition has been added so that notification can
  86.    be given to the LS40 GUI via a queue when LOGOFF occurs - MRED 04/21/94
  87. */
  88.  
  89. /**INTERNAL_ONLY**/
  90.  
  91. #define INFORM_GUI_QUEUE "\\QUEUES\\LS40\\LOGOFF.QUE"
  92.  
  93. /**END_INTERNAL**/
  94.  
  95. /*
  96.      String lengths
  97. */
  98. #define UPM_UIDLEN    10
  99.  
  100. /*
  101. The following password length applies to user logon profile entries only.
  102. */
  103. #define UPM_PWDLEN    10
  104. #define UPM_REMLEN    17
  105.  
  106. /*
  107.      Log (generic) an application process on the the system
  108. */
  109.  
  110. LSINT LSFAR LSPAS UPMGLGN(
  111.             unsigned short,        /*  userid length     */
  112.             unsigned short,        /*  password length   */
  113.             unsigned short,        /*  remotename length */
  114.             unsigned short,        /*  remotetype        */
  115.             unsigned short,        /*  authcheck         */
  116.             unsigned char LSFAR *,   /*  userid            */
  117.             unsigned char LSFAR *,   /*  password          */
  118.             unsigned char LSFAR *);  /*  remotename        */
  119.  
  120. /*
  121.      Log (generic) a user on to the system
  122. */
  123. LSINT LSFAR LSPAS UPMGULGN(
  124.             unsigned short,          /*  userid length     */
  125.             unsigned short,          /*  password length   */
  126.             unsigned short,          /*  remotename length */
  127.             unsigned short,          /*  remotetype        */
  128.             unsigned short,          /*  flags             */
  129.             unsigned char LSFAR *,   /*  userid            */
  130.             unsigned char LSFAR *,   /*  password          */
  131.             unsigned char LSFAR *);  /*  remotename        */
  132. /*
  133.      Log (generic) an application process off the system
  134. */
  135.  
  136. LSINT LSFAR LSPAS UPMGLGFF(
  137.             unsigned short,          /*  userid length     */
  138.             unsigned short,          /*  remotename length */
  139.             unsigned short,          /*  remotetype        */
  140.             unsigned char LSFAR *,   /*  userid            */
  141.             unsigned char LSFAR *);  /*  remotename        */
  142.  
  143. /*
  144.      Log (generic) a user off the system
  145. */
  146.  
  147. LSINT LSFAR LSPAS UPMGULGF(
  148.             unsigned short,          /*  userid length     */
  149.             unsigned short,          /*  remotename length */
  150.             unsigned short,          /*  remotetype        */
  151.             unsigned char LSFAR *,   /*  userid            */
  152.             unsigned char LSFAR *);  /*  remotename        */
  153.  
  154. /*
  155.      Get (generic) locally logged on user ID.
  156. */
  157.  
  158. LSINT LSFAR LSPAS UPMGLOCU(
  159.             unsigned short *,       /*  userid length     */
  160.             unsigned char LSFAR *,  /*  userid            */
  161.             unsigned short *);      /*  user type         */
  162. /*
  163.      Logon (generic) a local user ID.
  164. */
  165.  
  166. LSINT LSFAR LSPAS UPMGLOCL(
  167.             unsigned short *,         /*  userid length     */
  168.             unsigned char LSFAR *,    /*  userid            */
  169.             unsigned short *);        /*  user type         */
  170.  
  171. /*
  172.      (generic) logon user list
  173. */
  174. LSINT LSFAR LSPAS UPMGUSRL(
  175.             unsigned short,          /*  remotename length */
  176.             unsigned short,          /*  remotetype        */
  177.             unsigned short,          /*  bufferlen         */
  178.             unsigned short LSFAR *,  /*  entriesread */
  179.             unsigned short LSFAR *,  /*  totalentry  */
  180.             unsigned char LSFAR *,   /*  remotename  */
  181.             unsigned char LSFAR *);  /*  buffer      */
  182.  
  183. /*
  184.      Log an application process on the the system
  185. */
  186. LSINT LSFAR LSPAS UPMELGN(
  187.             unsigned char LSFAR *,   /*  userid      */
  188.             unsigned char LSFAR *,   /*  password     */
  189.             unsigned char LSFAR *,   /*  remotename  */
  190.             unsigned short,          /*  remotetype  */
  191.             unsigned short );        /*  authcheck   */
  192.  
  193. /*
  194.      Log an application process off the system
  195. */
  196. LSINT LSFAR LSPAS UPMELGFF(
  197.             unsigned char LSFAR *,   /*  userid      */
  198.             unsigned char LSFAR *,   /*  remotename  */
  199.             unsigned short );        /*  remotetype  */
  200. /*
  201.      Get the local user ID logged on the system
  202. */
  203. LSINT LSFAR LSPAS UPMELOCU(
  204.             unsigned char LSFAR *,   /*  userid      */
  205.             unsigned short *);       /*  type  */
  206. /*
  207.      Logon a local user ID on the system
  208. */
  209. LSINT LSFAR LSPAS UPMELOCL(
  210.             unsigned char LSFAR *,   /*  userid      */
  211.             unsigned short *);       /*  type  */
  212.  
  213. /*
  214.      Log a user on the system
  215. */
  216. LSINT LSFAR LSPAS UPMEULGN(
  217.             unsigned char LSFAR *,   /*  userid      */
  218.             unsigned char LSFAR *,   /*  password    */
  219.             unsigned char LSFAR *,   /*  remotename  */
  220.             unsigned short,          /*  remotetype  */
  221.             unsigned short );        /*  flags       */
  222.  
  223. /*
  224.      Log a user off the system
  225. */
  226. LSINT LSFAR LSPAS UPMEULGF(
  227.             unsigned char LSFAR *,   /*  userid      */
  228.             unsigned char LSFAR *,   /*  remotename  */
  229.             unsigned short );        /*  remotetype  */
  230. /*
  231.      Logged on user list
  232. */
  233.  
  234. LSINT LSFAR LSPAS UPMEUSRL(
  235.             unsigned char LSFAR *,     /*  remotename  */
  236.             short,                     /*  remotetype  */
  237.             char LSFAR *,              /*  buffer      */
  238.             unsigned short,            /*  bufferlen   */
  239.             unsigned short LSFAR *,    /*  entriesread */
  240.             unsigned short LSFAR * );  /*  totalentry  */
  241.  
  242. /*
  243.      Set a Users logon profile
  244. */
  245.  
  246. LSINT LSFAR LSPAS UPMESETP (
  247.             unsigned char LSFAR *,     /*  userid      */
  248.             char LSFAR *,              /*  buffer      */
  249.             unsigned short,            /*  entries     */
  250.             unsigned short );          /*  level       */
  251.  
  252. /*
  253.      Get a Users logon profile
  254. */
  255.  
  256. LSINT LSFAR LSPAS UPMEGETP (
  257.             unsigned char LSFAR *,     /*  userid      */
  258.             char LSFAR *,              /*  buffer      */
  259.             unsigned short,            /*  bufferlen   */
  260.             unsigned short LSFAR *,    /*  entriesread */
  261.             unsigned short LSFAR *,    /*  totalavail  */
  262.             unsigned short);           /*  level       */
  263.  
  264.  
  265. /**INTERNAL_ONLY**/
  266.  
  267. /* Undocumented Function */
  268.  
  269. LSINT LSFAR LSPAS UPMENPW(
  270.             char LSFAR *,              /* buffer       */
  271.             char LSFAR *,              /* new password */
  272.             unsigned short);           /* level        */
  273.  
  274. /**END_INTERNAL**/
  275.  
  276.  
  277.  
  278. /*
  279.      User logon structure for UPMGUSRL
  280. */
  281.  
  282. struct UPM_G_USER_LOGON
  283.        {
  284.          unsigned short useridlen;
  285.          unsigned short remotelen;
  286.          unsigned short remotetype;
  287.          LSINT          sessionid;
  288.          char           userid[UPM_UIDLEN + 1];
  289.          char           remotename[UPM_REMLEN + 1];
  290.        };
  291.  
  292. /*
  293.      User logon structure for upmeusrl
  294. */
  295.  
  296. struct UPM_USER_LOGON
  297.        {
  298.          char    userid[UPM_UIDLEN + 1];
  299.          short   remotetype;
  300.          char    remotename[UPM_REMLEN + 1];
  301.          LSINT   sessionid;
  302.        };
  303.  
  304. /*
  305.      User logon profile structure for upmegetp and upmesetp
  306. */
  307.  
  308. struct UPM_USER_LOGON_PROF_0 {
  309.           unsigned char userid[ UPM_UIDLEN + 1];
  310.           unsigned char password[ UPM_PWDLEN + 1];
  311.           unsigned char remotename[ UPM_REMLEN + 1];
  312.           unsigned short remotetype;
  313.           };
  314.  
  315.  
  316. /*
  317.      Valid values for the remotetype parameter
  318. */
  319. #define UPM_LOCAL            1
  320. #define UPM_DNODE            2
  321. #define UPM_DOMAIN           3
  322. /*
  323.      Additional remotetype value for upmeulgf
  324. */
  325. #define UPM_DOMAIN_MAX_FORCE 4
  326.  
  327. /*
  328.      Verbose upmeulgn (1.3.x style)
  329. */
  330. #define UPM_DOMAIN_VERBOSE   5
  331.  
  332. /*
  333.      Additional remotetype values for upmeusrl
  334. */
  335. #define UPM_LOCAL_HPFS     21
  336. #define UPM_ALL            22
  337.  
  338. /*
  339.      Lan Server logon flags for UPMEULGN.
  340.      If UPM_FL_LOCVER or UPM_FL_NOVER is specified remotename must null.
  341. */
  342.  
  343. #define UPM_FL_LOCVER               0x01   /* Local verification  */
  344. #define UPM_FL_NOVER                0x02   /* No verification     */
  345. #define UPM_FL_DOMVER               0x03   /* Domain verification */
  346.  
  347. /*
  348.      Valid values for the authcheck parameter
  349. */
  350. #define UPM_CONFIG         1
  351. #define UPM_ADMIN          2
  352. #define UPM_USER           3
  353.  
  354. /*
  355.      Valid user type privilege levels
  356. */
  357. #define UPM_PRIV_USER         1
  358. #define UPM_PRIV_ADMIN        2
  359. #define UPM_PRIV_LOCAL_ADMIN  9
  360. /*
  361.      Return values
  362.  
  363.      Note:  These values are all negative.  Any positive return
  364.            value signifies an unexpected OS/2 system level error
  365.            occurred.  The positive value is the OS/2 return code.
  366. */
  367. #define UPM_OK                 0      /* Successful.                         */
  368. #define UPM_LOG_INPROC         0xFB01 /* Another logon is in process.        */
  369. #define UPM_BAD_TYPE           0xFB02 /* Bad remotetype.                     */
  370. #define UPM_NOMEM              0xFB03 /* Cannot allocate required memory.    */
  371. #define UPM_LOG_FILE_NOT_FOUND 0xFB04 /* An execute file could not be found. */
  372. #define UPM_FAIL_SECURITY      0xFB05 /* User not logged, failed security
  373.                                          clearance.                          */
  374. #define UPM_BAD_PARAMETER      0xFB06 /* A parameter passed was invalid.     */
  375. #define UPM_BAD_AUTHCHECK      0xFB07 /* Authcheck was not valid.            */
  376. #define UPM_LOG_CANCEL         0xFB08 /* User has canceled from the logon
  377.                                          panel.                              */
  378. #define UPM_NOT_LOGGED         0xFB10 /* A logon has not occured for this
  379.                                          userid.                             */
  380. #define UPM_LOGGED             0xFB12 /* A domain logon is currently active. */
  381. #define UPM_SYS_ERROR          0xFB13 /* An unexpected system error.         */
  382. #define UPM_OPEN_SESSIONS      0xFB14 /* The domain logoff failed, The domain
  383.                                          logon has active sessions.          */
  384. #define UPM_ULP_LOADED         0xFB15 /* The local logon failed, a local
  385.                                          logon with a user logon profile is
  386.                                          active.                             */
  387. #define UPM_LOGGED_ELSEWHERE   0xFB16 /* The domain logon failed, the userid
  388.                                          is already logged on the domain.    */
  389. #define UPM_PASSWORD_EXP       0xFB17 /* The users password is expired.      */
  390. #define UPM_UNAVAIL            0xFB18 /* The logon failed, The remote node
  391.                                          or server could not be contacted to
  392.                                          process the logon request.          */
  393. #define UPM_ACTIVE             0xFB19 /* The domain logon or logoff failed,
  394.                                          a domain logon, logoff or net
  395.                                          command is in process.              */
  396. #define UPM_SS_PWDEXPWARNING   0xFB20 /* The local logon succeeded. The users
  397.                                          password is expired.                */
  398. #define UPM_SS_BUSY            0xFB21 /* The local logon failed. The Local
  399.                                          security was busy.                     */
  400. #define UPM_SS_DEAD            0xFB22 /* The local logon failed. Local
  401.                                          security has terminated unexpectedly.  */
  402. #define UPM_ERROR_MORE_DATA    0xFB23 /* More data is available, the buffer
  403.                                          provided is not large enough.       */
  404. #define UPM_MAX_ENT_EXCEEDED   0xFB24 /* Update failed, the input buffer
  405.                                          contains more than 16 entries.      */
  406. #define UPM_DUP_ULP_ENTRY      0xFB25 /* Two or more entries with the same
  407.                                          remote name and user ID were
  408.                                          detected.                           */
  409. #define UPM_MAX_ULP_EXCEEDED   0xFB26 /* Database contains maximum number
  410.                                          entries                             */
  411. #define UPM_NODISK             0xFB27 /* Insufficient disk space was available to
  412.                                          process this request   */
  413. #define UPM_PROF_NOT_FOUND     0xFB28 /* Did not find user logon profile for
  414.                                          user ID. */
  415. #define UPM_ERROR_NONVAL_LOGON 0xFB29 /* Non validated Lan Server logons are not
  416.                                          allowed with server service started  */
  417.  
  418.  
  419.  
  420.  
  421.  
  422. #ifdef  INCL_32
  423. #pragma linkage (UPMGLGN,  far16 pascal)
  424. #pragma linkage (UPMGULGN, far16 pascal)
  425. #pragma linkage (UPMGLGFF, far16 pascal)
  426. #pragma linkage (UPMGULGF, far16 pascal)
  427. #pragma linkage (UPMGLOCU, far16 pascal)
  428. #pragma linkage (UPMGLOCL, far16 pascal)
  429. #pragma linkage (UPMGUSRL, far16 pascal)
  430. #pragma linkage (UPMELGN,  far16 pascal)
  431. #pragma linkage (UPMELGFF, far16 pascal)
  432. #pragma linkage (UPMELOCU, far16 pascal)
  433. #pragma linkage (UPMELOCL, far16 pascal)
  434. #pragma linkage (UPMEULGN, far16 pascal)
  435. #pragma linkage (UPMEULGF, far16 pascal)
  436. #pragma linkage (UPMEUSRL, far16 pascal)
  437. #pragma linkage (UPMESETP, far16 pascal)
  438. #pragma linkage (UPMEGETP, far16 pascal)
  439. #pragma pack()
  440. #endif
  441.  
  442.