The Sybase implementation uses the same controlFlag values and definitions as those defined in the JAAS specification.
If you stack multiple providers, you must set the controlFlag attribute for each enabled provider.
Say you list providers in the following order and set the corresponding controlFlag attributes as follows:
A client doing certificate authentication (for example, X.509 SSO to SAP) can authenticate immediately. Subsequent modules are not called, because they are not required. If there are regular username/password credentials, then they go to LDAP (first), which may authenticate them, and set them up with roles from the LDAP groups they belong to. Then NativeOS is invoked, and if that also succeeds, Unwired Platform picks up roles based on the Windows groups they are in.