Changeset 94 in openpam
- Timestamp:
- Mar 7, 2002, 8:22:38 PM (19 years ago)
- Location:
- trunk/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/openpam_dynamic.c
r93 r94 32 32 * SUCH DAMAGE. 33 33 * 34 * $P4: //depot/projects/openpam/lib/openpam_dynamic.c# 2$34 * $P4: //depot/projects/openpam/lib/openpam_dynamic.c#3 $ 35 35 */ 36 36 … … 65 65 goto buf_err; 66 66 if ((dlh = dlopen(vpath, RTLD_NOW)) == NULL) { 67 openpam_log(PAM_LOG_ERROR, "dlopen(): %s", dlerror());68 67 *strrchr(vpath, '.') = '\0'; 69 68 if ((dlh = dlopen(vpath, RTLD_NOW)) == NULL) { 70 openpam_log(PAM_LOG_ERROR, "dlopen(): %s", dlerror());71 69 free(module); 72 70 return (NULL); 73 71 } 74 72 } 75 module->path = vpath; 73 free(vpath); 74 if ((module->path = strdup(path)) == NULL) 75 goto buf_err; 76 76 module->dlh = dlh; 77 77 for (i = 0; i < PAM_NUM_PRIMITIVES; ++i) -
trunk/lib/openpam_load.c
r93 r94 32 32 * SUCH DAMAGE. 33 33 * 34 * $P4: //depot/projects/openpam/lib/openpam_load.c#1 1$34 * $P4: //depot/projects/openpam/lib/openpam_load.c#12 $ 35 35 */ 36 36 … … 82 82 } 83 83 #endif 84 if (module == NULL) 84 if (module == NULL) { 85 openpam_log(PAM_LOG_ERROR, "no %s found", path); 85 86 return (NULL); 87 } 88 openpam_log(PAM_LOG_DEBUG, "adding %s to cache", module->path); 86 89 module->next = modules; 90 if (module->next != NULL) 91 module->next->prev = module; 87 92 module->prev = NULL; 88 93 modules = module; … … 120 125 if (module->next != NULL) 121 126 module->next->prev = module->prev; 127 if (module == modules) 128 modules = module->next; 129 openpam_log(PAM_LOG_DEBUG, "releasing %s", module->path); 122 130 free(module->path); 123 131 free(module);
Note: See TracChangeset
for help on using the changeset viewer.