| |
|
|
| declared LsaOpenPolicy bid The basis for very interesting Opportunities under Profan in the Adminbereich. unfortunately have I To little Idea from the API and others Programmiersprachen and bite me on whom Structures this function in the moment The teeth from . i want The function on one local system utilize circa on the Policy-lever To come, the one for others APIs the Securitybereichs needed. Who pleasure, me go to page To stand or enough Idea, circa me moreover To help? have Profan² 7.5... |
|
|
| |
|
|
|
| well that I me of these Topic not at all auskenne - praised be me there one linux. *coolyeah*
salvo, iF |
|
|
| |
|
|
|
| Hello IF...
Schade really. The Adminsektor bid for Profan integral better and interessantere Opportunities as it The development of play does. there can with Profan on very simple and einleuchtende point extreme interesting and very useful items zaubern.
I engage me unfortunately est with the API since I into Profanforen poste - I count me therefore sooner to the Anfängern. for somebody with little more experience might The 4-Parameterfunktion no large trouble present - It's all right Yes really only therefore, a handle To get. I stolpere in the moment something over the first and second Parameter (I faith Unicode_String is the Untier, the me plagt!?) => really almost vain Structures - still How big? what can there very everything on zero settle??? |
|
|
| |
|
|
|
| Zeig still simply time since - ifs dirnur therefore goes can I sure help. |
|
|
| |
|
|
|
| Hello IF...
think too time, that You there help can. after I yet a Info in the network on of/ one C++ Page found have, sustain I now under windows2000 too a number as Return. but, spare to Hamlett, Have I the lever or Have I not, this is here The question... CompileMarkSeparationDEF @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#
|
|
|
| |
|
|
|
Michael Dell | Have time the following from the MSDN zusammengestellt, hope it is correctly because testing konnt ichs Nich (there Win98).
hope it helps:[quote:cb47d68b17]Struct LSA_UNICODE_STRING = Length#(2),MaximumLength#(2),Buffer& to XProfan = Length%,MaximumLength%,Buffer& Buffer = Pointer to a wide character string. note that the strings returned by the various LSA functions might hardship be zero terminated.
Struct LSA_OBJECT_ATTRIBUTES = Length&,RootDirectory&,ObjectName&,Attributes&,SecurityDescriptor#(1),SecurityQualityOfService#(1) ObjectName& = PLSA_UNICODE_STRING (=LSA_UNICODE_STRING)
LsaOpenPolicy- structure Start Struct LsaOpenPolicy = PLSA_UNICODE_STRING&,PLSA_OBJECT_ATTRIBUTES&,DesiredAccess#(2),PolicyHandle& PLSA_UNICODE_STRING& = LSA_UNICODE_STRING&, PLSA_OBJECT_ATTRIBUTES& = LSA_OBJECT_ATTRIBUTES&
Parameters:
SystemName Pointer to on LSA_UNICODE_STRING structure that contains the name of the target system. The name can have the shape computer_name or \computer_name. If this parameter is NULL, the function opens the Policy object on the local system.
ObjectAttributes Pointer to on LSA_OBJECT_ATTRIBUTES structure that specifies the connection attributes. The structure members are hardship used; initialize them to NULL or zero.
DesiredAccess on ACCESS_MASK that specifies the requested access rights. The function fails if the DACL of the target system does hardship allow the caller the requested access. To determine the access rights that you need, sea the documentation for the LSA functions with which you want to use the policy lever.
PolicyHandle [in, out] Pointer to on LSA_HANDLE variable that receives a handle to the Policy object. When you no longer need this lever, pass it to the LsaClose function to close it.
Return Values If the function succeeds, the function returns STATUS_SUCCESS. If the function fails, it returns on NTSTATUS code. For more information, sea LSA Policy Function Return 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 lever in subsequent LSA function calls to administer the local security policy information of the target system. LsaOpenPolicy- structure end
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). Diese type of access requires the calling process to have the SE_SECURITY_NAME (Manage auditing and security log) privilege. If this flag is set in the access mask of on audit access ACE (successful or unsuccessful access), the SACL access wants 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] Greeting... |
|
|
| Salu Michael...
Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! | 12/14/04 ▲ |
|
|
|
|
| Hello Michael...
THANK YOU! Werds so quick How possible testing and my things equalize!! |
|
|
| |
|
|
|
| Hello Michael...
JA!!!! DAS WARS!!! ICH HAB DAS HANDLE!!!!! it flutsch, it functions, ES KLAPPT ES GEHT!!!!!!! there have I so plenty railway-station understood, that I there first nächstes year durchgefunden had! ICH KANN DIR GAR NOT SAGEN WIE ICH MICH FREUE! is the beautiful, now come I moreover...
|
|
|
| |
|
|
|
| Yes Why ask You me because then not same.
salvo, iF :biggrin: |
|
|
| |
|
|
|
Michael Dell | lovely, It's all right still nothing over NEN gelungenen evening!
Have strain once more in the MSDN nachgesehn and discover that I there Maybe what wrong Translated having could.
The both variables SecurityDescriptor#(1) & SecurityQualityOfService#(1) in the structure LSA_OBJECT_ATTRIBUTES go as PVOID described means as Pointer, ought to something not funzen attempts time these both variables as #(2) or #(4) To Deklarieren.
Greeting... |
|
|
| Salu Michael...
Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! | 12/14/04 ▲ |
|
|
|
|
| Hello Michael...
except for The ACCESS_MASK has everything hingehauen, werds but nevertheless time with the Pointer try. have now The übersetzte feedback ERROR_SUCCESS instead of Error 998. this lever is quasi the golden Key to the Sicherheitseinstellungen Windows2000/XP! I can now reinsehen, umordnen and what rausnehmen - over again best Thanks! |
|
|
| |
|
|