DEVEL15-windows-afs-config-vista-uac-20070918
authorJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 18 Sep 2007 07:14:23 +0000 (07:14 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 18 Sep 2007 07:14:23 +0000 (07:14 +0000)
Mark afs_config.exe via a manifest with
requestedExecutionLevel = HighestAvailable

This will ensure that when Vista UAC is active, that a member of the
Administrators group must run the AFS Control Panel with Administrators
privileges.

(cherry picked from commit 9bf29bbe1e0f8eabe4586dc3bdb5afceb2c19c30)

src/WINNT/client_config/NTMakefile
src/WINNT/client_config/afs_config.exe.manifest [new file with mode: 0644]

index 1cb08c3..24d31fd 100644 (file)
@@ -21,6 +21,8 @@ RELDIR=WINNT\client_config
 
 EXEFILE = $(DESTDIR)\root.client\usr\vice\etc\afs_config.exe
 
+MANIFEST = $(EXEFILE).manifest
+
 EXEOBJS = \
        $(OUT)\config.obj \
        $(OUT)\drivemap.obj \
@@ -107,6 +109,11 @@ $(EXEOBJSc): $$(@B).c
 
 $(EXEFILE) : $(EXEOBJS) $(EXEOBJSc) $(EXERES) $(AFSDOBJS) $(EXELIBS)
        $(EXEGUILINK) $(VCLIBS)
+!IF ("$(AFS_CL)" == "1400")
+        if exist $@.manifest mt.exe -manifest afs_config.exe.manifest $(MANIFEST) -out:$(MANIFEST)
+!ELSE
+        $(COPY) afs_config.exe.manifest $(MANIFEST)
+!ENDIF
         $(_VC_MANIFEST_EMBED_EXE)
        $(EXEPREP) 
 
@@ -166,6 +173,7 @@ $(OUT)\afs_config_stub.res : afs_config_stub.rc AFS_component_version_number.h
 
 clean::
        $(DEL) $(COPYHEADERS)
+        $(DEL) $(MANIFEST)
        $(CD) lang
        $(DEL) AFS_component_version_number.h
        if exist $(NTLANG) $(NTLANG) en_US $(MAKECMD) /nologo /e /f NTMakefile clean
diff --git a/src/WINNT/client_config/afs_config.exe.manifest b/src/WINNT/client_config/afs_config.exe.manifest
new file mode 100644 (file)
index 0000000..49eee1a
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 
+  <openafs:trustInfo xmlns:openafs="urn:schemas-microsoft-com:asm.v2">
+    <openafs:security>
+      <openafs:requestedPrivileges>
+        <openafs:requestedExecutionLevel
+          level="highestAvailable"
+          uiAccess="false"/>
+        </openafs:requestedPrivileges>
+       </openafs:security>
+  </openafs:trustInfo>
+</assembly>
+