Date: Tue, 25 Oct 2005 09:09:25 GMT From: soc-bushman <soc-bushman@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 85820 for review Message-ID: <200510250909.j9P99P3Y002928@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=85820 Change 85820 by soc-bushman@soc-bushman_stinger on 2005/10/25 09:09:22 release fixes Affected files ... .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/Makefile#2 edit .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/Makefile#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agent.c#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agent.h#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agents/Makefile.inc#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agents/group.c#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agents/group.h#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agents/hosts.c#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agents/hosts.h#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agents/passwd.c#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agents/passwd.h#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agents/services.c#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agents/services.h#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/cached.8#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/cached.c#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/cached.conf#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/cached.conf.5#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/cachelib.c#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/cachelib.h#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/cacheplcs.c#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/cacheplcs.h#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/config.c#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/config.h#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/debug.c#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/debug.h#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/hashtable.h#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/log.c#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/log.h#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/mp_rs_query.c#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/mp_rs_query.h#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/mp_ws_query.c#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/mp_ws_query.h#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/parser.c#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/parser.h#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/protocol.c#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/protocol.h#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/query.c#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/query.h#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/singletons.c#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/singletons.h#2 integrate .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/startup/cached#2 edit Differences ... ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/Makefile#2 (text+ko) ==== @@ -1,4 +1,6 @@ # $FreeBSD$ SUBDIR+="cached" +.include "../Makefile.inc" .include <bsd.subdir.mk> + ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/Makefile#2 (text+ko) ==== @@ -22,7 +22,7 @@ CONFMODE=${SHAREMODE} CONF+=${.CURDIR}/cached.conf -.PATH: ./agents +.PATH: ${.CURDIR}/agents .include "agents/Makefile.inc" .include <bsd.prog.mk> ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agent.c#2 (text+ko) ==== @@ -77,6 +77,7 @@ new_agents_num = at->agents_num + 1; new_agents = (struct agent **)malloc(sizeof(struct agent *) * new_agents_num); + assert(new_agents != NULL); memcpy(new_agents, at->agents, at->agents_num * sizeof(struct agent *)); new_agents[new_agents_num - 1] = a; qsort(new_agents, new_agents_num, sizeof(struct agent *), ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agent.h#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agents/Makefile.inc#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agents/group.c#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agents/group.h#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agents/hosts.c#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agents/hosts.h#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agents/passwd.c#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agents/passwd.h#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agents/services.c#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agents/services.h#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/cached.8#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/cached.c#2 (text+ko) ==== @@ -130,8 +130,11 @@ FILE *pidfile; pidfile = fopen(filename, "w"); - if (pidfile == NULL) + if (pidfile == NULL) { + LOG_ERR_2("write_pid_file", "can't write to pidfile %s", + filename); return (-1); + } asprintf(&pid_string,"%u",getpid()); assert(pid_string != NULL); @@ -187,6 +190,7 @@ &config_entry->negative_cache_params); } + LOG_MSG_2("cache", "cache was successfully initialized"); TRACE_OUT(init_cache_); return (retval); } @@ -232,9 +236,13 @@ close(retval->sockfd); free(retval); + LOG_ERR_2("runtime environment", "can't bind socket to path: " + "%s", config->socket_path); TRACE_OUT(init_runtime_env); return (NULL); } + LOG_MSG_2("runtime environment", "using socket %s", + config->socket_path); /* * Here we're marking socket as non-blocking and setting its backlog @@ -252,6 +260,7 @@ memset(&timeout, 0, sizeof(struct timespec)); kevent(retval->queue, &eventlist, 1, NULL, 0, &timeout); + LOG_MSG_2("runtime environment", "successfully initialized"); TRACE_OUT(init_runtime_env); return (retval); } @@ -343,6 +352,8 @@ return; } else { /* some other error happened */ + LOG_ERR_2("process_socket_event", "kevent error, errno" + " is %d", errno); TRACE_OUT(process_socket_event); return; } @@ -488,6 +499,8 @@ struct query_state *qstate; TRACE_IN(process_timer_event); + LOG_MSG_2("processing_timer_event", "timer event received - " + "abandoning request"); qstate = (struct query_state *)event_data->udata; destroy_query_state(qstate); close(event_data->ident); @@ -650,6 +663,7 @@ register_agent(s_agent_table, init_group_mp_agent()); register_agent(s_agent_table, init_services_agent()); register_agent(s_agent_table, init_services_mp_agent()); + LOG_MSG_1("main", "request agents registered successfully"); /* * Hosts agent can't work properly until we have access to the ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/cached.conf#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/cached.conf.5#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/cachelib.c#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/cachelib.h#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/cacheplcs.c#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/cacheplcs.h#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/config.c#2 (text+ko) ==== @@ -32,6 +32,7 @@ #include <string.h> #include "config.h" #include "debug.h" +#include "log.h" #define INITIAL_ENTRIES_CAPACITY 8 #define DEFAULT_SOCKET_PATH "/var/run/cached" @@ -106,6 +107,8 @@ if (res != 0) { free(retval); pthread_mutexattr_destroy(&attr); + LOG_ERR_2("create_configuration_entry", + "can't create positive cache lock"); TRACE_OUT(create_configuration_entry); return (NULL); } @@ -115,6 +118,8 @@ pthread_mutex_destroy(&retval->positive_cache_lock); free(retval); pthread_mutexattr_destroy(&attr); + LOG_ERR_2("create_configuration_entry", + "can't create negative cache lock"); TRACE_OUT(create_configuration_entry); return (NULL); } @@ -125,6 +130,8 @@ pthread_mutex_destroy(&retval->negative_cache_lock); free(retval); pthread_mutexattr_destroy(&attr); + LOG_ERR_2("create_configuration_entry", + "can't create negative cache lock"); TRACE_OUT(create_configuration_entry); return (NULL); } ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/config.h#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/debug.c#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/debug.h#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/hashtable.h#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/log.c#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/log.h#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/mp_rs_query.c#2 (text+ko) ==== @@ -124,6 +124,8 @@ c_mp_rs_request->entry_length); if (result != qstate->kevent_watermark) { + LOG_ERR_3("on_mp_read_session_request_read2", + "read failed"); TRACE_OUT(on_mp_read_session_request_read2); return (-1); } @@ -302,6 +304,8 @@ result = qstate->write_func(qstate, &c_mp_rs_response->error_code, sizeof(int)); if (result != sizeof(int)) { + LOG_ERR_3("on_mp_read_session_response_write1", + "write failed"); TRACE_OUT(on_mp_read_session_response_write1); return (-1); } @@ -330,6 +334,8 @@ } else { result = qstate->read_func(qstate, &elem_type, sizeof(int)); if (result != sizeof(int)) { + LOG_ERR_3("on_mp_read_session_mapper", + "read failed"); TRACE_OUT(on_mp_read_session_mapper); return (-1); } @@ -348,6 +354,8 @@ default: qstate->kevent_watermark = 0; qstate->process_func = NULL; + LOG_ERR_3("on_mp_read_session_mapper", + "unknown element type"); TRACE_OUT(on_mp_read_session_mapper); return (-1); } @@ -409,6 +417,8 @@ sizeof(size_t)); if (result != qstate->kevent_watermark) { TRACE_OUT(on_mp_read_session_read_response_write1); + LOG_ERR_3("on_mp_read_session_read_response_write1", + "write failed"); return (-1); } @@ -416,6 +426,8 @@ qstate->process_func = on_mp_read_session_read_response_write2; } else { if (result != qstate->kevent_watermark) { + LOG_ERR_3("on_mp_read_session_read_response_write1", + "write failed"); TRACE_OUT(on_mp_read_session_read_response_write1); return (-1); } @@ -440,6 +452,8 @@ result = qstate->write_func(qstate, read_response->data, read_response->data_size); if (result != qstate->kevent_watermark) { + LOG_ERR_3("on_mp_read_session_read_response_write2", + "write failed"); TRACE_OUT(on_mp_read_session_read_response_write2); return (-1); } ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/mp_rs_query.h#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/mp_ws_query.c#2 (text+ko) ==== @@ -90,11 +90,15 @@ &c_mp_ws_request->entry_length, sizeof(size_t)); if (result != sizeof(size_t)) { + LOG_ERR_3("on_mp_write_session_request_read1", + "read failed"); TRACE_OUT(on_mp_write_session_request_read1); return (-1); } if (BUFSIZE_INVALID(c_mp_ws_request->entry_length)) { + LOG_ERR_3("on_mp_write_session_request_read1", + "invalid entry_length value"); TRACE_OUT(on_mp_write_session_request_read1); return (-1); } @@ -125,6 +129,8 @@ c_mp_ws_request->entry_length); if (result != qstate->kevent_watermark) { + LOG_ERR_3("on_mp_write_session_request_read2", + "read failed"); TRACE_OUT(on_mp_write_session_request_read2); return (-1); } @@ -228,6 +234,8 @@ result = qstate->write_func(qstate, &c_mp_ws_response->error_code, sizeof(int)); if (result != sizeof(int)) { + LOG_ERR_3("on_mp_write_session_response_write1", + "write failed"); TRACE_OUT(on_mp_write_session_response_write1); return (-1); } @@ -256,6 +264,8 @@ } else { result = qstate->read_func(qstate, &elem_type, sizeof(int)); if (result != sizeof(int)) { + LOG_ERR_3("on_mp_write_session_mapper", + "read failed"); TRACE_OUT(on_mp_write_session_mapper); return (-1); } @@ -279,6 +289,8 @@ default: qstate->kevent_watermark = 0; qstate->process_func = NULL; + LOG_ERR_2("on_mp_write_session_mapper", + "unknown element type"); TRACE_OUT(on_mp_write_session_mapper); return (-1); } @@ -303,11 +315,15 @@ sizeof(size_t)); if (result != sizeof(size_t)) { + LOG_ERR_3("on_mp_write_session_write_request_read1", + "read failed"); TRACE_OUT(on_mp_write_session_write_request_read1); return (-1); } if (BUFSIZE_INVALID(write_request->data_size)) { + LOG_ERR_3("on_mp_write_session_write_request_read1", + "invalid data_size value"); TRACE_OUT(on_mp_write_session_write_request_read1); return (-1); } @@ -336,6 +352,8 @@ write_request->data_size); if (result != qstate->kevent_watermark) { + LOG_ERR_3("on_mp_write_session_write_request_read2", + "read failed"); TRACE_OUT(on_mp_write_session_write_request_read2); return (-1); } @@ -387,6 +405,8 @@ result = qstate->write_func(qstate, &write_response->error_code, sizeof(int)); if (result != sizeof(int)) { + LOG_ERR_3("on_mp_write_session_write_response_write1", + "write failed"); TRACE_OUT(on_mp_write_session_write_response_write1); return (-1); } ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/mp_ws_query.h#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/parser.c#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/parser.h#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/protocol.c#2 (text+ko) ==== @@ -82,6 +82,7 @@ &element->c_mp_rs_read_response); break; default: + LOG_ERR_2("init_comm_element", "invalid communication element"); TRACE_OUT(init_comm_element); return; } ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/protocol.h#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/query.c#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/query.h#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/singletons.c#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/singletons.h#2 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/startup/cached#2 (text+ko) ==== @@ -21,7 +21,7 @@ name=cached rcvar=`set_rcvar` -command=#cached_bindir#/cached +command=/usr/sbin/cached cached_enable=${cached_enable:-"NO"} cached_pidfile=${cached_pidfile:-"/var/run/cached.pid"} @@ -29,3 +29,4 @@ load_rc_config $name run_rc_command "$1" +
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510250909.j9P99P3Y002928>