Changeset 180 for trunk/src/sh_prelude.c
- Timestamp:
- Sep 23, 2008, 6:55:45 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_prelude.c
r170 r180 700 700 idmef_address_t *address; 701 701 idmef_node_t *node; 702 idmef_user_t *user; 703 idmef_process_t *process; 702 704 idmef_service_t *service; 703 705 idmef_source_t *source = idmef_alert_get_next_source(alert, NULL); … … 847 849 848 850 SH_FREE( new ); 851 852 ptr = get_value(msg, _("user"), NULL); 853 854 if ( ptr ) { 855 856 ret = idmef_source_new_user(source, &user); 857 if ( ret < 0 ) { 858 free(ptr); 859 return ret; 860 } 861 862 ret = idmef_user_new_ident(user, &str); 863 if ( ret < 0 ) { 864 free(ptr); 865 return ret; 866 } 867 prelude_string_set_nodup(str, ptr); 868 } 869 870 ptr = get_value(msg, _("path"), NULL); 871 872 if ( ptr ) { 873 874 /* 875 * In term of IDMEF, this is the full path, 876 * including the name. 877 */ 878 ret = idmef_source_new_process(source, &process); 879 if ( ret < 0 ) { 880 free(ptr); 881 return ret; 882 } 883 884 ret = idmef_process_new_path(process, &str); 885 if ( ret < 0 ) { 886 free(ptr); 887 return ret; 888 } 889 prelude_string_set_nodup(str, ptr); 890 891 ptr = strrchr(ptr, '/'); 892 if ( ptr ) { 893 ret = idmef_process_new_name(process, &str); 894 if ( ret == 0 ) { 895 prelude_string_set_dup(str, ptr + 1); 896 } 897 } 898 } 849 899 850 900 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.