/* let's see if there is any id mapping to be retrieved
* from the backends */
- if (bi) {
+ if (bids) {
+ bool online;
+
/* Only do query if we are online */
- if ( IS_DOMAIN_OFFLINE(our_domain) ) {
- ret = NT_STATUS_FILE_IS_OFFLINE;
- goto done;
+ online = !IS_DOMAIN_OFFLINE(our_domain);
+ if (online) {
+ ret = idmap_backends_unixids_to_sids(bids);
+ IDMAP_CHECK_RET(ret);
}
- ret = idmap_backends_unixids_to_sids(bids);
- IDMAP_CHECK_RET(ret);
-
/* update the cache */
for (i = 0; i < bi; i++) {
if (bids[i]->status == ID_MAPPED) {
* unmapped and hope next time things will
* settle down. */
bids[i]->status = ID_UNMAPPED;
- } else { /* unmapped */
+ } else if (online) { /* unmapped */
ret = idmap_cache_set_negative_id(idmap_cache,
bids[i]);
}
/* let's see if there is any id mapping to be retrieved
* from the backends */
if (bids) {
+ bool online;
+
/* Only do query if we are online */
- if ( IS_DOMAIN_OFFLINE(our_domain) ) {
- ret = NT_STATUS_FILE_IS_OFFLINE;
- goto done;
+ online = !IS_DOMAIN_OFFLINE(our_domain);
+ if (online) {
+ ret = idmap_backends_sids_to_unixids(bids);
+ IDMAP_CHECK_RET(ret);
}
- ret = idmap_backends_sids_to_unixids(bids);
- IDMAP_CHECK_RET(ret);
-
/* update the cache */
for (i = 0; bids[i]; i++) {
if (bids[i]->status == ID_MAPPED) {
* unmapped and hope next time things will
* settle down. */
bids[i]->status = ID_UNMAPPED;
- } else { /* unmapped */
+ } else if (online) { /* unmapped */
ret = idmap_cache_set_negative_sid(idmap_cache,
bids[i]);
}