3 import sys
,os
,subprocess
6 print "Usage: test_wbinfo_sids2xids_int.py wbinfo"
10 domain
= subprocess
.Popen([wbinfo
, "--own-domain"],
11 stdout
=subprocess
.PIPE
).communicate()[0].strip()
12 domsid
= subprocess
.Popen([wbinfo
, "-n", domain
+ "\\"],
13 stdout
=subprocess
.PIPE
).communicate()[0]
14 domsid
= domsid
.split(' ')[0]
19 sids
=[ domsid
+ '-512', 'S-1-5-32-545', domsid
+ '-513' ]
21 sids2xids
= subprocess
.Popen([wbinfo
, '--sids-to-unix-ids=' + ','.join(sids
)],
22 stdout
=subprocess
.PIPE
).communicate()[0].strip()
26 for line
in sids2xids
.split('\n'):
27 result
= line
.split(' ')[2:]
29 if result
[0] == 'gid':
40 gid
= subprocess
.Popen([wbinfo
, '--sid-to-gid', sid
],
41 stdout
=subprocess
.PIPE
).communicate()[0].strip()
43 print "Expected %s, got %s\n", gid
, gids
[i
]