Windows: AFSFileOpenResultCB.Authenticated
authorJeffrey Altman <jaltman@your-file-system.com>
Thu, 7 Feb 2013 00:35:00 +0000 (19:35 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Fri, 8 Feb 2013 03:03:02 +0000 (19:03 -0800)
Notify the redirector whether the the result of a file open
request is the result of a user authenticated action.

Change-Id: If1f7704b3ea31e40e88b3589fd604a7d50653ec1
Reviewed-on: http://gerrit.openafs.org/9077
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsrdr/common/AFSUserStructs.h
src/WINNT/afsrdr/user/RDRFunction.c

index ab550d4..c654464 100644 (file)
@@ -341,6 +341,8 @@ typedef struct _AFS_FILE_OPEN_RESULT_CB
 
     ULONG           FileAccess;
 
+    ULONG           Authenticated;
+
 } AFSFileOpenResultCB;
 
 typedef struct _AFS_FILE_ACCESS_RELEASE_CB
index 598f3ff..9f7c7c9 100644 (file)
@@ -3086,6 +3086,8 @@ RDR_OpenFileEntry( IN cm_user_t *userp,
     {
         int count = 0;
 
+        pResultCB->Authenticated = cm_HaveToken(userp, scp->fid.cell);
+
         do {
             if (count++ > 0) {
                 Sleep(350);
@@ -3099,6 +3101,8 @@ RDR_OpenFileEntry( IN cm_user_t *userp,
                                   userp, &req, &ldp);
             if (code == 0)
                 code = RDR_CheckAccess(scp, userp, &req, OpenCB->DesiredAccess, &pResultCB->GrantedAccess);
+
+
             cm_CheckNTOpenDone(scp, userp, &req, &ldp);
         } while (count < 100 && (code == CM_ERROR_RETRY || code == CM_ERROR_WOULDBLOCK));
     }