Changeset 587


Ignore:
Timestamp:
10/23/11 15:51:30 (3 years ago)
Author:
sgrubb
Message:

Add 2 error returns to python bindings

Location:
branches/1.8
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/1.8/ChangeLog

    r585 r587  
    2020- Update auparse to handle virt events 
    2121- Make audisp-remote robust 
     22- Add 2 error returns to python bindings 
    2223 
    23241.7.18 
  • branches/1.8/bindings/python/Makefile.am

    r120 r587  
    11# Makefile.am -- 
    2 # Copyright 2007, 2008 Red Hat Inc., Durham, North Carolina. 
     2# Copyright 2007,2008,2011 Red Hat Inc., Durham, North Carolina. 
    33# All Rights Reserved. 
    44# 
     
    2828auparse_la_SOURCES = auparse_python.c 
    2929auparse_la_CPPFLAGS = -I$(top_srcdir)/auparse $(AM_CPPFLAGS) -I/usr/include/python$(PYTHON_VERSION) -fno-strict-aliasing 
    30 auparse_la_LDFLAGS = -module -avoid-version 
     30auparse_la_LDFLAGS = -module -avoid-version -Wl,-z,relro 
    3131auparse_la_LIBADD = ../../auparse/libauparse.la ../../lib/libaudit.la 
  • branches/1.8/bindings/python/auparse_python.c

    r236 r587  
    129129    snprintf(buf2, sizeof(buf2), buf1, milli, serial, host, sizeof(buf2)); 
    130130    return buf2; 
    131     exit(EXIT_SUCCESS); 
    132131} 
    133132 
     
    974973 
    975974    if (event_ptr == NULL) { 
    976         Py_RETURN_NONE; 
    977         PyErr_SetFromErrno(PyExc_EnvironmentError); 
    978         return NULL; 
     975        if (errno) { 
     976            PyErr_SetFromErrno(PyExc_EnvironmentError); 
     977            return NULL; 
     978        } else { 
     979            Py_RETURN_NONE; 
     980        } 
    979981    } 
    980982    py_event = AuEvent_new_from_struct(event_ptr); 
Note: See TracChangeset for help on using the changeset viewer.