[python-win32] Building pywin32 & adsi support

2014-01-21 Thread Tim Golden
I'm trying to bring my active_directory module up to scratch with Python 3. I'm hitting a couple of effective showstoppers. First: I can't even build pywin32 for any revision past 337015e6d473, which is when the IConverterSession stuff went in. I've tried a couple of tweaks, but basically: """ co

Re: [python-win32] Compiling Python as a static .exe

2014-01-21 Thread Russell Wallace
The '...' is the long list of source files I got from pythoncore.vcproj, plus getbuildinfo.c, and the required include directives. You would think a missing main function would be the explanation, but the absence of a leading _ in the error message is a key indicator. To make sure, I tried adding a

Re: [python-win32] Building pywin32 & adsi support

2014-01-21 Thread Mark Hammond
On 21/01/2014 9:23 PM, Tim Golden wrote: I'm trying to bring my active_directory module up to scratch with Python 3. I'm hitting a couple of effective showstoppers. First: I can't even build pywin32 for any revision past 337015e6d473, which is when the IConverterSession stuff went in. I've tried

Re: [python-win32] Building pywin32 & adsi support

2014-01-21 Thread Tim Golden
On 21/01/2014 12:20, Mark Hammond wrote: > On 21/01/2014 9:23 PM, Tim Golden wrote: >> I'm trying to bring my active_directory module up to scratch with Python >> 3. I'm hitting a couple of effective showstoppers. >> >> First: I can't even build pywin32 for any revision past 337015e6d473, >> which

[python-win32] Issue with taking ownership

2014-01-21 Thread Joseph L. Casale
I have a scenario where I have a directory owned by localhost\Administrators with that group and SYSTEM set to full control without inheritance propagated. Under this, I have a folder owned by another account with only that account granted full control. If I elevate my token and run: win32secu

Re: [python-win32] Issue with taking ownership

2014-01-21 Thread Tim Golden
On 21/01/2014 15:36, Joseph L. Casale wrote: > I have a scenario where I have a directory owned by localhost\Administrators > with > that group and SYSTEM set to full control without inheritance propagated. > > Under this, I have a folder owned by another account with only that account > granted

Re: [python-win32] Compiling Python as a static .exe

2014-01-21 Thread Russell Wallace
Ah, that works now, thanks! That gets me an executable, which if run from within the Python-2.7.6 directory so it can find Lib/*.py, gives the following error message: Traceback (most recent call last): File ".\lib\site.py", line 548, in main() File ".\lib\site.py", line 537, in main

Re: [python-win32] Issue with taking ownership

2014-01-21 Thread Joseph L. Casale
> I think I understand your setup, which I've simulated below: an > "ownership" directory owned by Admins and with SYSTEM & Admins only > having full control. No inheritance; no propagation. Then an > "other-account" directory below it; again, no inheritance and owned by a > different account which

Re: [python-win32] Issue with taking ownership

2014-01-21 Thread Tim Golden
On 21/01/2014 15:36, Joseph L. Casale wrote: I have a scenario where I have a directory owned by localhost\Administrators with that group and SYSTEM set to full control without inheritance propagated. Under this, I have a folder owned by another account with only that account granted full cont

Re: [python-win32] Issue with taking ownership

2014-01-21 Thread Joseph L. Casale
> Just by way of a slightly cheeky plug, this is how you'd take ownership > using Winsys [1] (from an elevated prompt for simplicity's sake): Hardly cheeky, That module is far more complete than I'd ever hope to accomplish, right now I am stuck between Python 3 usage and an immediate need to get a

Re: [python-win32] Issue with taking ownership

2014-01-21 Thread Joseph L. Casale
> In my scenario (while the token is elevated) how does one replace a DACL with > a new one that I add an ACE granting my context full control without reading > the > security descriptor, or, with elevated state active, how can I also add > read_control > when I get write_dac so I can read the sd