//Sample code file: var/ndk/webBuildengine/tmp/viewable_samples/a4ad0b48-dd95-46b6-8289-721e99c8dc76/login_method/lsm/unix/src/unix_lsm.c

//Warning: This code has been marked up for HTML

/*
**
Method Name:        Cleartext Password Method.
Method Platform:    UNIX Servers

Copyright (C) 2002 Novell, Inc. All Rights Reserved. 

THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND
TREATIES. USE AND REDISTRIBUTION OF THIS WORK IS SUBJECT TO THE
LICENSE AGREEMENT ACCOMPANYING THE SOFTWARE DEVELOPMENT KIT
(SDK) THAT CONTAINS THIS WORK. PURSUANT TO THE SDK LICENSE
AGREEMENT, NOVELL HEREBY GRANTS TO DEVELOPER A ROYALTY-FREE,
NON-EXCLUSIVE LICENSE TO INCLUDE NOVELL'S SAMPLE CODE IN ITS
PRODUCT. NOVELL GRANTS DEVELOPER WORLDWIDE DISTRIBUTION RIGHTS TO
MARKET, DISTRIBUTE, OR SELL NOVELL'S SAMPLE CODE AS A COMPONENT OF
DEVELOPER'S PRODUCTS. NOVELL SHALL HAVE NO OBLIGATIONS TO
DEVELOPER OR DEVELOPER'S CUSTOMERS WITH RESPECT TO THIS CODE.
*/

class='cKeyword'>#if !defined(AIX)
class='cKeyword'>#pragma init (InitializeMethod)
class='cKeyword'>#pragma fini (ExitMethod)
class='cKeyword'>#endif

class='cKeyword'>class='cKeyword'>#ifdef LINUX    /* Actually GCC */
int __attribute__ ((__constructor__)) InitializeMethod();
int __attribute__ ((__destructor__)) ExitMethod();
class='cKeyword'>#endif            

//pid_t ourHandle;

int ourNLMHandle, ourThreadGroupID;
int activeThreadCount = 0;

/* ******************************************************************* */
int SetThreadGroupID(int ourThreadGroupID)
{
   return 0;
}

/* ******************************************************************* */
int InitializeMethod()
{
   int err = 0;
   
//   ourHandle = getpid() + 0x91;
   
   if ( activeThreadCount == 0 )
   {
   }
   activeThreadCount++;
}

/* ******************************************************************* */
int ExitMethod()
{
   activeThreadCount--;
   if ( activeThreadCount <= 0 )
   {
   }
   return 0;
}
/* ******************************************************************* */
/* ******************************************************************* */