- if ((hp = hes_resolve(user_name, "filsys")) != NULL)
- {
- memset(cWeight, 0, sizeof(cWeight));
- memset(cPath, 0, sizeof(cPath));
- last_weight = 1000;
- i = 0;
-
- while (hp[i] != NULL)
- {
- if (sscanf(hp[i], "%*s %s", cPath))
- {
- if (strnicmp(cPath, AFS, strlen(AFS)) == 0)
- {
- 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;
- }
-
- if (strlen(path))
- {
- if (!strnicmp(path, AFS, strlen(AFS)))
- {
- sprintf(homedir, "%s", path);
- sprintf(apple_homedir, "%s/MacData", path);
- homedir_v[0] = homedir;
- apple_homedir_v[0] = apple_homedir;
- ADD_ATTR("homeDirectory", homedir_v, OpType);
- ADD_ATTR("apple-user-homeDirectory", apple_homedir_v,
- OpType);
- }
- }
- else
+ if (rc = moira_connect())
+ {
+ critical_alert("AD incremental",
+ "Error contacting Moira server : %s",
+ error_message(rc));
+ return;
+ }
+
+ argv[0] = user_name;
+
+ if (!(rc = mr_query("get_filesys_by_label", 1, argv, save_query_info,
+ save_argv)))
+ {
+ if(!strcmp(save_argv[FS_TYPE], "FSGROUP") ||
+ !strcmp(save_argv[FS_TYPE], "MUL"))