Windows: Interlocked ops for cm_user flags

Change-Id: I64932b0d15b439614b6bbba0ba875eacb1260832
Reviewed-on: http://gerrit.openafs.org/5273
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
Jeffrey Altman 2011-08-14 21:41:19 -04:00 committed by Jeffrey Altman
parent a5d66d05fa
commit f752142827
4 changed files with 6 additions and 6 deletions

View File

@ -820,7 +820,7 @@ cm_Analyze(cm_conn_t *connp, cm_user_t *userp, cm_req_t *reqp,
free(ucellp->ticketp);
ucellp->ticketp = NULL;
}
ucellp->flags &= ~CM_UCELLFLAG_RXKAD;
_InterlockedAnd(&ucellp->flags, ~CM_UCELLFLAG_RXKAD);
ucellp->gen++;
lock_ReleaseMutex(&userp->mx);
if ( timeLeft > 2 )

View File

@ -2565,7 +2565,7 @@ cm_IoctlSetToken(struct cm_ioctl *ioctlp, struct cm_user *userp)
cm_UsernameToId(uname, ucellp, &ucellp->uid);
#endif
}
ucellp->flags |= CM_UCELLFLAG_RXKAD;
_InterlockedOr(&ucellp->flags, CM_UCELLFLAG_RXKAD);
lock_ReleaseMutex(&userp->mx);
if (flags & PIOCTL_LOGON) {
@ -2790,7 +2790,7 @@ cm_IoctlDelToken(struct cm_ioctl *ioctlp, struct cm_user *userp)
ucellp->kvno = 0;
ucellp->expirationTime = 0;
ucellp->userName[0] = '\0';
ucellp->flags &= ~CM_UCELLFLAG_RXKAD;
_InterlockedAnd(&ucellp->flags, ~CM_UCELLFLAG_RXKAD);
ucellp->gen++;
lock_ReleaseMutex(&userp->mx);
@ -2824,7 +2824,7 @@ cm_IoctlDelAllToken(struct cm_ioctl *ioctlp, struct cm_user *userp)
ucellp->kvno = 0;
ucellp->expirationTime = 0;
ucellp->userName[0] = '\0';
ucellp->flags &= ~CM_UCELLFLAG_RXKAD;
_InterlockedAnd(&ucellp->flags, ~CM_UCELLFLAG_RXKAD);
ucellp->gen++;
}

View File

@ -184,7 +184,7 @@ void cm_CheckTokenCache(time_t now)
free(ucellp->ticketp);
ucellp->ticketp = NULL;
}
ucellp->flags &= ~CM_UCELLFLAG_RXKAD;
_InterlockedAnd(&ucellp->flags, ~CM_UCELLFLAG_RXKAD);
ucellp->gen++;
bExpired=TRUE;
}

View File

@ -1198,7 +1198,7 @@ smb_IoctlSetToken(struct smb_ioctl *ioctlp, struct cm_user *userp, afs_uint32 pf
cm_UsernameToId(uname, ucellp, &ucellp->uid);
#endif
}
ucellp->flags |= CM_UCELLFLAG_RXKAD;
_InterlockedOr(&ucellp->flags, CM_UCELLFLAG_RXKAD);
lock_ReleaseMutex(&userp->mx);
if ((pflags & AFSCALL_FLAG_LOCAL_SYSTEM) && (flags & PIOCTL_LOGON)) {