Skip to content

Commit c0b4b0a

Browse files
committed
---
yaml --- r: 322553 b: refs/heads/tensorflow-next c: b63e32a h: refs/heads/master i: 322551: 270ad14
1 parent cfb1ae0 commit c0b4b0a

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1461,4 +1461,4 @@ refs/heads/master-rebranch: 86e95c23aa0d37f24ec138b7853146c1cead2e40
14611461
refs/heads/rdar-53901732: 9bd06af3284e18a109cdbf9aa59d833b24eeca7b
14621462
refs/heads/revert-26776-subst-always-returns-a-type: 1b8e18fdd391903a348970a4c848995d4cdd789c
14631463
refs/heads/tensorflow-merge: 8b854f62f80d4476cb383d43c4aac2001dde3cec
1464-
refs/heads/tensorflow-next: af1cd7d9d8cc0a067a5d003a207ddcb4e1802069
1464+
refs/heads/tensorflow-next: b63e32aec648b30d2337c41599fc70aa4680cc5a

branches/tensorflow-next/test/ParseableInterface/Inputs/make-unreadable.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,16 @@
2121
buffer = ctypes.create_unicode_buffer(UNLEN + 1)
2222
size = ctypes.c_uint(len(buffer))
2323
GetUserNameW(buffer, ctypes.byref(size))
24+
# For NetworkService, Host$ is returned, so we choose have to turn it back
25+
# into something that icacls understands.
26+
if not buffer.value.endswith('$'):
27+
user_name = buffer.value
28+
else:
29+
user_name = 'NT AUTHORITY\\NetworkService'
2430

2531
for path in sys.argv[1:]:
2632
subprocess.call(['icacls', path, '/deny',
27-
'{}:(R)'.format(buffer.value)])
33+
'{}:(R)'.format(user_name)])
2834
else:
2935
for path in sys.argv[1:]:
3036
subprocess.call(['chmod', 'a-r', path])

0 commit comments

Comments
 (0)