Español
Foro

API LsaOpenPolicy

 
El API LsaOpenPolicy bietet el Grundlage para muy interessante Möglichkeiten bajo Profano en el Adminbereich. Leider Yo a wenig Idea de el API y otro Programmiersprachen y beiße me a el Estructuras dieser Función en el Augenblick el Zähne de .
Yo möchte el Función en una lokales Sistema anwenden en a el Policy-Handle a kommen, el uno para otro APIs des Securitybereichs benötigt.
Wer ha Lust, me a Página a posición oder genug Idea, en me más a helfen?
Posesiones Profano² 7.5...
 
14.12.2004  
 



Gut el Yo mich con diesem Thema überhaupt no auskenne - gelobt sei me como una linux. *coolyeah*

Salve, IF
 
14.12.2004  
 



¡Hola IF...

Schade eigentlich. Der Adminsektor bietet para Profano wesentlich bessere y interessantere Möglichkeiten como lo el Desarrollo de Spielen tut. Como dejar se con Profano en muy einfache y einleuchtende Weise extremo interessante y muy nützliche Dinge zaubern.

Yo beschäftige mich desafortunadamente est con el API seit Yo en el Profanforen poste - Yo zähle mich deshalb más a Anfängern.
Für jemanden con algo mehr Erfahrung dürfte el 4-Parameterfunktion kein großes Problema darstellen - lo va sí eigentlich sólo por lo tanto, una Handle a bekommen. Yo stolpere en el Augenblick algo encima el ersten y zweiten Parámetro (Yo glaube Unicode_String heißt el Untier, el mich plagt!?) => eigentlich fast vacío Estructuras - doch como groß? Was puede ser como genau alles en Null conjunto???
 
14.12.2004  
 



Zeig doch simplemente veces her - wenns dirnur por lo tanto va kann Yo sicherlich helfen.
 
14.12.2004  
 



¡Hola IF...

Denke auch veces, daß du como helfen kannst.
Nachdem Todavía una Referencia en el Netz en uno C++ Página gefunden habe, erhalte Yo ahora bajo Windows2000 auch una Zahl como Rückgabe.
Aber, frei después de Hamlett, tener Yo el Handle oder tener Yo no, el es hier el Cuestión...
KompilierenMarcaSeparación
DEF @LsaOpenPolicy(4) !"advapi32","LsaOpenPolicy"
DEF @LsaClose(1) !"advapi32","LsaClose"
Declare POLICY_Handle#,Attribut#,Policy_Handle&,UNICODE#
Declare Ergebnis&
DIM POLICY_Handle#,4
DIM Attribut#,(4+4+5+1+1)
DIM UNICODE#,5
CLS
Long Attribut#,0=15
Word Attribut#,8=1
Word Attribut#,10=1
WORD Unicode#,0=1
WORD Unicode#,2=1
STRING Unicode#,4=""
LET ERGEBNIS&=@LsaOpenPolicy(Unicode#,Attribut#,$80000000 | $20000000 | 16 | 2048,POLICY_Handle#)
LET Policy_Handle&=@LONG(POLICY_Handle#,0)
PRINT Policy_Handle&
LET ERGEBNIS&=@LsaClose(@long(POLICY_Handle#,0))
WAITINPUT
Dispose Attribut#
Dispose Unicode#
Dispo
POLICY_Handle#
 
14.12.2004  
 




Michael
Dell
Hab veces folgendes de el MSDN zusammengestellt, hoffe lo is korrekt porque Testen konnt ego nich (como Win98).

Hoffe lo hilft:[quote:cb47d68b17]Struct LSA_UNICODE_STRING = Length#(2),MaximumLength#(2),Buffer& antes XProfan = Length%,MaximumLength%,Buffer&
Buffer = Pointer to a wide character cadena.
Note that the strings returned by the various LSA functions might not be null terminated.

Struct LSA_OBJECT_ATTRIBUTES = Length&,RootDirectory&,ObjectName&,Attributes&,SecurityDescriptor#(1),SecurityQualityOfService#(1)
ObjectName& = PLSA_UNICODE_STRING (=LSA_UNICODE_STRING)

LsaOpenPolicy- Struktur Start
Struct LsaOpenPolicy = PLSA_UNICODE_STRING&,PLSA_OBJECT_ATTRIBUTES&,DesiredAccess#(2),PolicyHandle&
PLSA_UNICODE_STRING& = LSA_UNICODE_STRING&,
PLSA_OBJECT_ATTRIBUTES& = LSA_OBJECT_ATTRIBUTES&

Parámetros:

SystemName Pointer to a LSA_UNICODE_STRING structure that contains the name of the target system.
The name can have the form computer_name or \computer_name.
If this parameter is NULL, the function opens the Policy object on the local system.

ObjectAttributes Pointer to a LSA_OBJECT_ATTRIBUTES structure that specifies the connection attributes.
The structure members are not used; initialize them to NULL or zero.

DesiredAccess An ACCESS_MASK that specifies the requested access rights.
The function fails if the DACL of the target system does not allow the caller the requested access.
To determine the access rights that you need, see the documentation for the LSA functions with which you want to use the policy handle.

PolicyHandle [en, out] Pointer to a LSA_HANDLE variable that receives a handle to the Policy object.
When you no longer need this handle, pass it to the LsaClose function to close it.

Volver Values
If the function succeeds, the function returns STATUS_SUCCESS.
If the function fails, it returns a NTSTATUS code. For more information, see LSA Policy Function Volver Values.
You can use the LsaNtStatusToWinError function to convert the NTSTATUS code to a Windows error code.

Remarks
To administer the local security policy of a local or remote system, you must call the LsaOpenPolicy function to establish a session with that systems LSA subsystem. LsaOpenPolicy connects to the LSA of the target system and returns a handle to the Policy object of that system. You can use this handle en subsequent LSA function calls to administer the local security policy information of the target system.
LsaOpenPolicy- Struktur Ende

ACCESS_MASK ( =DesiredAccess#(2) )

Bits Meaning
0 through 15 Specific rights. Contains the access mask specific to the object type associated with the mask.
16 through 23 Standard rights. Contains the objects standard access rights.

24 Access system security (ACCESS_SYSTEM_SECURITY). It is used to indicate access to a system access control list (SACL). This type of access requires the calling process to have the SE_SECURITY_NAME (Manage auditing and security log) privilege. If this flag is set en the access mask of a audit access ACE (successful or unsuccessful access), the SACL access voluntad be audited.
25 Maximum allowed (MAXIMUM_ALLOWED).
26 through 27 Reserved.
28 Generic all (GENERIC_ALL).
29 Generic execute (GENERIC_EXECUTE).
30 Generic write (GENERIC_WRITE).
31 Generic read (GENERIC_READ).

Standard rights bits, 16 to 23, contain the objects standard access rights and can be a combination of the following predefined flags.

Bit Flag Meaning
16 DELETE Delete access.
17 READ_CONTROL Read access to the owner, group, and discretionary access control list (DACL) of the security descriptor.
18 WRITE_DAC Write access to the DACL.
19 WRITE_OWNER Write access to owner.
20 SYNCHRONIZE Synchronize access.

The following constants represent the specific and standard access rights:

#define SPECIFIC_RIGHTS_ALL 0x0000FFFF
#define STANDARD_RIGHTS_REQUIRED 0x000F0000
#define STANDARD_RIGHTS_ALL 0x001F0000[/quote:cb47d68b17]
Saludo...
 
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
14.12.2004  
 



¡Hola Michael...

DANKE! Werds así rápidamente como posible testen y media Sachen abgleichen!!
 
14.12.2004  
 



¡Hola Michael...

JA!!!! DAS WARS!!! ICH HAB DAS HANDLE!!!!! Lo flutsch, lo funktioniert, ES KLAPPT ES GEHT!!!!!!! Como Yo así viel Bahnhof verstanden, Yo como sólo nächstes Jahr durchgefunden hätte! ICH KANN DIR GAR NICHT SAGEN WIE ICH MICH FREUE!
Ist el schön, ahora komme Yo más...
 
14.12.2004  
 



Sí por qué fragst Usted mich porque entonces no es igual.

Salve, IF :biggrin:
 
14.12.2004  
 




Michael
Dell
Prima, lo va doch nix encima nen gelungenen Abend!

Hab grad una vez más en el MSDN nachgesehn y entdeckt el Yo como vieleicht qué falso traducido haben podría.

El beiden Variables SecurityDescriptor#(1) & SecurityQualityOfService#(1) en el Struktur
LSA_OBJECT_ATTRIBUTES voluntad como PVOID beschrieben also como Pointer, debería algo no funzen
intenta veces esta beiden Variables como #(2) oder #(4) a Deklarieren.

Saludo...
 
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
14.12.2004  
 



¡Hola Michael...

Bis en el ACCESS_MASK ha alles hingehauen, werds aber trotzdem veces con el Pointer versuchen. Posesiones ahora el übersetzte Rückmeldung ERROR_SUCCESS en lugar de Fehler 998.
Dieses Handle es quasi el goldene Schlüssel a Sicherheitseinstellungen de Windows2000/XP! Puedo nun reinsehen, umordnen y qué rausnehmen - nochmals besten Dank!
 
15.12.2004  
 



Respuesta


Título del Tema, max. 100 Signo.
 

Systemprofile:

Kein Systemprofil creado. [anlegen]

XProfan:

 Contribución  Font  Smilies  ▼ 

Bitte registro en una Contribución a verfassen.
 

Tema opciones

4.787 Views

Untitledvor 0 min.

Themeninformationen

Dieses Thema ha 2 subscriber:

unbekannt (9x)
Michael Dell (2x)


Admins  |  AGB  |  Applications  |  Autores  |  Chat  |  Política de Privacidad  |  Descargar  |  Entrance  |  Ayuda  |  Merchantportal  |  Pie de imprenta  |  Mart  |  Interfaces  |  SDK  |  Services  |  Juegos  |  Búsqueda  |  Support

Ein Projekt aller XProfan, el lo son!


Mi XProfan
Privado Noticias
Eigenes Ablageforum
Temas-Merkliste
Eigene Beiträge
Eigene Temas
Zwischenablage
Cancelar
 Deutsch English Français Español Italia
Traducciones

Política de Privacidad


Wir uso Cookies sólo como Session-Cookies wegen el technischen Notwendigkeit y en uns hay no Cookies de Drittanbietern.

Wenn du hier en unsere Webseite klickst oder navigierst, stimmst du unserer Erfassung de Informationen en unseren Cookies en XProfan.Net a.

Weitere Informationen a unseren Cookies y dazu, como du el Kontrolle darüber behältst, findest du en unserer nachfolgenden Datenschutzerklärung.


einverstandenDatenschutzerklärung
Yo möchte no Cookie