~ubuntu-branches/ubuntu/intrepid/net-snmp/intrepid-updates

« back to all changes in this revision

Viewing changes to snmplib/vacm.c

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2006-11-28 12:29:34 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20061128122934-82xxzy2zcvypnvy7
Tags: 5.2.3-4ubuntu1
* Merge from debian unstable, remaining changes:
  - remove stop links from rc0 and rc6

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
    line = skip_token(line);
138
138
    view.viewType = atoi(line);
139
139
    line = skip_token(line);
 
140
    len = sizeof(view.viewName);
140
141
    line =
141
142
        read_config_read_octet_string(line, (u_char **) & viewName, &len);
142
143
    view.viewSubtreeLen = MAX_OID_LEN;
147
148
    vptr =
148
149
        vacm_createViewEntry(view.viewName, view.viewSubtree,
149
150
                             view.viewSubtreeLen);
150
 
    if (!vptr)
 
151
    if (!vptr) {
151
152
        return;
 
153
    }
152
154
 
153
155
    vptr->viewStatus = view.viewStatus;
154
156
    vptr->viewStorageType = view.viewStorageType;
221
223
    line = skip_token(line);
222
224
    access.contextMatch = atoi(line);
223
225
    line = skip_token(line);
 
226
    len = sizeof(access.groupName);
224
227
    line =
225
228
        read_config_read_octet_string(line, (u_char **) & groupName, &len);
 
229
    len = sizeof(access.contextPrefix);
226
230
    line =
227
231
        read_config_read_octet_string(line, (u_char **) & contextPrefix,
228
232
                                      &len);
239
243
    aptr->securityLevel = access.securityLevel;
240
244
    aptr->contextMatch = access.contextMatch;
241
245
    readView = (char *) aptr->readView;
 
246
    len = sizeof(aptr->readView);
242
247
    line =
243
248
        read_config_read_octet_string(line, (u_char **) & readView, &len);
244
249
    writeView = (char *) aptr->writeView;
 
250
    len = sizeof(aptr->writeView);
245
251
    line =
246
252
        read_config_read_octet_string(line, (u_char **) & writeView, &len);
247
253
    notifyView = (char *) aptr->notifyView;
 
254
    len = sizeof(aptr->notifyView);
248
255
    line =
249
256
        read_config_read_octet_string(line, (u_char **) & notifyView,
250
257
                                      &len);
293
300
    line = skip_token(line);
294
301
    group.securityModel = atoi(line);
295
302
    line = skip_token(line);
 
303
    len = sizeof(group.securityName);
296
304
    line =
297
305
        read_config_read_octet_string(line, (u_char **) & securityName,
298
306
                                      &len);
304
312
    gptr->status = group.status;
305
313
    gptr->storageType = group.storageType;
306
314
    groupName = (char *) gptr->groupName;
 
315
    len = sizeof(group.groupName);
307
316
    line =
308
317
        read_config_read_octet_string(line, (u_char **) & groupName, &len);
309
318
}
614
623
                break;
615
624
            lastvp = vp;
616
625
        }
617
 
        if (!vp)
 
626
        if (!vp || !lastvp)
618
627
            return;
619
628
        lastvp->next = vp->next;
620
629
    }
737
746
                break;
738
747
            lastvp = vp;
739
748
        }
740
 
        if (!vp)
 
749
        if (!vp || !lastvp)
741
750
            return;
742
751
        lastvp->next = vp->next;
743
752
    }
900
909
                break;
901
910
            lastvp = vp;
902
911
        }
903
 
        if (!vp)
 
912
        if (!vp || !lastvp)
904
913
            return;
905
914
        lastvp->next = vp->next;
906
915
    }