From 7863a0affc9938132badeadbb8a7923e0fc65e79 Mon Sep 17 00:00:00 2001 From: zacheiss Date: Tue, 24 Jul 2001 20:50:32 +0000 Subject: [PATCH] Redo support for users with fsgroups. --- incremental/winad/winad.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/incremental/winad/winad.c b/incremental/winad/winad.c index 4d886486..af52f77b 100755 --- a/incremental/winad/winad.c +++ b/incremental/winad/winad.c @@ -2359,15 +2359,21 @@ int user_update(LDAP *ldap_handle, char *dn_path, char *user_name, i = 0; while (hp[i] != NULL) { - sscanf(hp[i], "%*s %s", cPath); - if (strlen(cPath) && strnicmp(cPath, AFS, strlen(AFS)) == 0) + if (sscanf(hp[i], "%*s %s", cPath)) { - sscanf(hp[i], "%*s %*s %*s %*s %s", cWeight); - if (atoi(cWeight) < last_weight) + if (strnicmp(cPath, AFS, strlen(AFS)) == 0) { - strcpy(path, cPath); - last_weight = (int)atoi(cWeight); - } + if (sscanf(hp[i], "%*s %*s %*s %*s %s", cWeight)) + { + if (atoi(cWeight) < last_weight) + { + strcpy(path, cPath); + last_weight = (int)atoi(cWeight); + } + } + else + strcpy(path, cPath); + } } ++i; } -- 2.45.2