Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Re: win32security.LogonUser (http://www.velocityreviews.com/forums/t319405-re-win32security-logonuser.html)

John Abel 07-08-2003 07:00 PM

Re: win32security.LogonUser
 
OK, try adding it to "Replace A Process Level Token" (sorry about this,
when I was trying to get my FTP server running, I forgot to write down,
which ones I'd changed. Doh!)

Here's the code I'm using, to adjust the tokens, and the calls that I make:

self.AdjustPrivilege( ntsecuritycon.SE_CHANGE_NOTIFY_NAME )
self.AdjustPrivilege( ntsecuritycon.SE_ASSIGNPRIMARYTOKEN_NAME )
self.AdjustPrivilege( ntsecuritycon.SE_TCB_NAME )


def AdjustPrivilege( self, priv ):
flags = ntsecuritycon.TOKEN_ADJUST_PRIVILEGES |
ntsecuritycon.TOKEN_QUERY
htoken =
win32security.OpenProcessToken(win32api.GetCurrent Process(), flags)
id = win32security.LookupPrivilegeValue(None, priv)
newPrivileges = [(id, ntsecuritycon.SE_PRIVILEGE_ENABLED)]
win32security.AdjustTokenPrivileges(htoken, 0, newPrivileges)

Darrell Gallion wrote:

>Thanks John
>
>That was done with no luck.
>Added it to Administrators and Administrator.
>
>
>
>__________________________________
>Do you Yahoo!?
>SBC Yahoo! DSL - Now only $29.95 per month!
>http://sbc.yahoo.com
>
>
>





All times are GMT. The time now is 04:46 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.