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

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 2570 by kumaneko, Wed May 20 07:12:32 2009 UTC revision 2581 by kumaneko, Sun May 24 05:43:34 2009 UTC
# Line 73  static struct ccs_address_group_entry *c Line 73  static struct ccs_address_group_entry *c
73          struct ccs_address_group_entry *group;          struct ccs_address_group_entry *group;
74          const struct ccs_path_info *saved_group_name;          const struct ccs_path_info *saved_group_name;
75          int error = -ENOMEM;          int error = -ENOMEM;
76          if (!ccs_is_correct_path(group_name, 0, 0, 0, __func__) ||          if (!ccs_is_correct_path(group_name, 0, 0, 0) ||
77              !group_name[0])              !group_name[0])
78                  return NULL;                  return NULL;
79          saved_group_name = ccs_get_name(group_name);          saved_group_name = ccs_get_name(group_name);
# Line 177  static int ccs_update_address_group_entr Line 177  static int ccs_update_address_group_entr
177                  }                  }
178                  list_add_tail(&entry->list, &group->address_group_member_list);                  list_add_tail(&entry->list, &group->address_group_member_list);
179                  entry = NULL;                  entry = NULL;
                 atomic_inc(&group->users);  
180                  error = 0;                  error = 0;
181          }          }
182          up_write(&ccs_policy_lock);          up_write(&ccs_policy_lock);
# Line 446  const char *ccs_net2keyword(const u8 ope Line 445  const char *ccs_net2keyword(const u8 ope
445   * @min_port:    Start of port number range.   * @min_port:    Start of port number range.
446   * @max_port:    End of port number range.   * @max_port:    End of port number range.
447   * @domain:      Pointer to "struct ccs_domain_info".   * @domain:      Pointer to "struct ccs_domain_info".
448   * @condition:   Pointer to "struct ccs_condition_list". May be NULL.   * @condition:   Pointer to "struct ccs_condition". May be NULL.
449   * @is_delete:   True if it is a delete request.   * @is_delete:   True if it is a delete request.
450   *   *
451   * Returns 0 on success, negative value otherwise.   * Returns 0 on success, negative value otherwise.
# Line 457  static int ccs_update_network_entry(cons Line 456  static int ccs_update_network_entry(cons
456                                      const u32 *max_address,                                      const u32 *max_address,
457                                      const u16 min_port, const u16 max_port,                                      const u16 min_port, const u16 max_port,
458                                      struct ccs_domain_info *domain,                                      struct ccs_domain_info *domain,
459                                      struct ccs_condition_list *condition,                                      struct ccs_condition *condition,
460                                      const bool is_delete)                                      const bool is_delete)
461  {  {
462          struct ccs_ip_network_acl_record *entry = NULL;          struct ccs_ip_network_acl_record *entry = NULL;
# Line 663  static int ccs_check_network_entry(const Line 662  static int ccs_check_network_entry(const
662                  error = err;                  error = err;
663                  goto done;                  goto done;
664          }          }
665          if (r.mode == 1 && ccs_domain_quota_ok(r.cookie.u.domain))          if (r.mode == 1 && ccs_domain_quota_ok(r.cookie.u.domain)) {
666                    struct ccs_condition *cond = ccs_handler_cond();
667                  ccs_update_network_entry(operation, is_ipv6 ?                  ccs_update_network_entry(operation, is_ipv6 ?
668                                           IP_RECORD_TYPE_IPv6 :                                           IP_RECORD_TYPE_IPv6 :
669                                           IP_RECORD_TYPE_IPv4,                                           IP_RECORD_TYPE_IPv4,
670                                           NULL, address, address, port, port,                                           NULL, address, address, port, port,
671                                           r.cookie.u.domain, ccs_handler_cond(),                                           r.cookie.u.domain, cond, false);
672                                           false);                  ccs_put_condition(cond);
673            }
674          error = 0;          error = 0;
675   done:   done:
676          ccs_exit_request_info(&r);          ccs_exit_request_info(&r);
# Line 681  static int ccs_check_network_entry(const Line 682  static int ccs_check_network_entry(const
682   *   *
683   * @data:      String to parse.   * @data:      String to parse.
684   * @domain:    Pointer to "struct ccs_domain_info".   * @domain:    Pointer to "struct ccs_domain_info".
685   * @condition: Pointer to "struct ccs_condition_list". May be NULL.   * @condition: Pointer to "struct ccs_condition". May be NULL.
686   * @is_delete: True if it is a delete request.   * @is_delete: True if it is a delete request.
687   *   *
688   * Returns 0 on success, negative value otherwise.   * Returns 0 on success, negative value otherwise.
689   */   */
690  int ccs_write_network_policy(char *data, struct ccs_domain_info *domain,  int ccs_write_network_policy(char *data, struct ccs_domain_info *domain,
691                               struct ccs_condition_list *condition,                               struct ccs_condition *condition,
692                               const bool is_delete)                               const bool is_delete)
693  {  {
694          u8 sock_type;          u8 sock_type;

Legend:
Removed from v.2570  
changed lines
  Added in v.2581

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