オープンソース・ソフトウェアの開発とダウンロード

Subversion リポジトリの参照

Diff of /trunk/1.8.x/ccs-patch/security/ccsecurity/network.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 514 by kumaneko, Fri Sep 28 05:08:39 2007 UTC revision 581 by kumaneko, Tue Oct 16 08:00:21 2007 UTC
# Line 5  Line 5 
5   *   *
6   * Copyright (C) 2005-2007  NTT DATA CORPORATION   * Copyright (C) 2005-2007  NTT DATA CORPORATION
7   *   *
8   * Version: 1.5.0   2007/09/20   * Version: 1.5.1-pre   2007/10/16
9   *   *
10   * This file is applicable to both 2.4.30 and 2.6.11 and later.   * This file is applicable to both 2.4.30 and 2.6.11 and later.
11   * See README.ccs for ChangeLog.   * See README.ccs for ChangeLog.
# Line 377  static int CheckNetworkEntry(const u8 is Line 377  static int CheckNetworkEntry(const u8 is
377          return 0;          return 0;
378  }  }
379    
380  int AddNetworkPolicy(char *data, struct domain_info *domain, const u8 is_delete)  int AddNetworkPolicy(char *data, struct domain_info *domain, const struct condition_list *condition, const u8 is_delete)
381  {  {
382          u8 sock_type, operation, record_type;          u8 sock_type, operation, record_type;
383          u16 min_address[8], max_address[8];          u16 min_address[8], max_address[8];
# Line 385  int AddNetworkPolicy(char *data, struct Line 385  int AddNetworkPolicy(char *data, struct
385          u16 min_port, max_port;          u16 min_port, max_port;
386          int count;          int count;
387          char *cp1 = NULL, *cp2 = NULL;          char *cp1 = NULL, *cp2 = NULL;
         const struct condition_list *condition = NULL;  
         cp1 = FindConditionPart(data);  
         if (cp1 && (condition = FindOrAssignNewCondition(cp1)) == NULL) goto out;  
388          if ((cp1 = strchr(data, ' ')) == NULL) goto out; cp1++;          if ((cp1 = strchr(data, ' ')) == NULL) goto out; cp1++;
389          if (strncmp(data, "TCP ", 4) == 0) sock_type = SOCK_STREAM;          if (strncmp(data, "TCP ", 4) == 0) sock_type = SOCK_STREAM;
390          else if (strncmp(data, "UDP ", 4) == 0) sock_type = SOCK_DGRAM;          else if (strncmp(data, "UDP ", 4) == 0) sock_type = SOCK_DGRAM;

Legend:
Removed from v.514  
changed lines
  Added in v.581

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26