Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Move lib/Utils/DBusClientProxy.* to src/Applet/; do not link rpm to libABRTUtils | Denys Vlasenko | 2009-09-17 | 1 | -9/+14 |
| | | | | | | | | | | | | | | | | | | | | | As a result, we can drop these libs from libABRTUtils: libbz2.so.1 => /lib64/libbz2.so.1 (0x00007ff8934ef000) libdb-4.7.so => /lib64/libdb-4.7.so (0x00007ff8921ae000) libdbus-c++-1.so.0 => /usr/lib64/libdbus-c++-1.so.0 (0x00007ff895276000) libelf.so.1 => /usr/lib64/libelf.so.1 (0x00007ff8930c5000) liblua-5.1.so => /usr/lib64/liblua-5.1.so (0x00007ff892c7a000) liblzma.so.0 => /usr/lib64/liblzma.so.0 (0x00007ff892ea5000) libnspr4.so => /lib64/libnspr4.so (0x00007ff890ec2000) libnss3.so => /lib64/libnss3.so (0x00007ff892948000) libnssutil3.so => /lib64/libnssutil3.so (0x00007ff891505000) libplc4.so => /lib64/libplc4.so (0x00007ff891300000) libplds4.so => /lib64/libplds4.so (0x00007ff8910fd000) libpopt.so.0 => /lib64/libpopt.so.0 (0x00007ff89273f000) librpmio.so.0 => /usr/lib64/librpmio.so.0 (0x00007ff8954a8000) librpm.so.0 => /usr/lib64/librpm.so.0 (0x00007ff8956d9000) Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||||
* | unify CommLayer, MiddleWare and Utils into Utils | Denys Vlasenko | 2009-09-15 | 1 | -13/+13 |
| | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||||
* | fix the bug where lock file was not removed | Denys Vlasenko | 2009-09-09 | 1 | -1/+0 |
| | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||||
* | PYHOOK: ignore KeyboardInterrupt exception | Jiri Moskovcak | 2009-09-09 | 1 | -0/+3 |
| | |||||
* | whitespace cleanup, no code changes | Denys Vlasenko | 2009-08-18 | 2 | -3/+3 |
| | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||||
* | PYHOOK: fixed exception re-throwing and deprecation warning (use hashlib ↵ | Jiri Moskovcak | 2009-08-12 | 1 | -4/+4 |
| | | | | instead of md5) | ||||
* | PYHOOK: UID is handled as integer | Jiri Moskovcak | 2009-08-11 | 1 | -2/+2 |
| | |||||
* | dumpoops, fix the style | Anton Arapov | 2009-08-11 | 1 | -57/+65 |
| | |||||
* | silly whitespace fix | Denys Vlasenko | 2009-08-06 | 1 | -1/+1 |
| | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||||
* | Merge branch 'master' of ssh://vda@git.fedorahosted.org/git/abrt | Denys Vlasenko | 2009-08-06 | 1 | -1/+1 |
|\ | |||||
| * | Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt | Jiri Moskovcak | 2009-08-06 | 2 | -105/+97 |
| |\ | | | | | | | | | | | | | Conflicts: lib/CommLayer/DBusServerProxy.h | ||||
| * | | PYHOOK: re-raise the exception, so the hook doesn't change the default ↵ | Jiri Moskovcak | 2009-08-06 | 1 | -1/+1 |
| | | | | | | | | | | | | behaviour. | ||||
* | | | fix vda's breakage: coredumps should be 644, not 600 | Denys Vlasenko | 2009-08-06 | 1 | -1/+5 |
| |/ |/| | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||||
* | | trailing whitespace removal. no code changes | Denys Vlasenko | 2009-08-06 | 1 | -1/+1 |
| | | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||||
* | | CDebugDump::Create(pDir, pUID): make 2nd param uid_t, not string | Denys Vlasenko | 2009-08-05 | 1 | -1/+1 |
| | | |||||
* | | Hooks/CCpp.cpp: don't dump executables with "/abrt" substring in the name | Denys Vlasenko | 2009-08-05 | 1 | -37/+56 |
| | | | | | | | | | | | | some cleanups and abrtlib work crept in too... Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||||
* | | open with O_CREAT must have 3 args, fixing that | Denys Vlasenko | 2009-08-05 | 1 | -1/+1 |
| | | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||||
* | | simplify C/C++ hook | Denys Vlasenko | 2009-08-05 | 1 | -75/+48 |
|/ | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||||
* | remove redundant virtual destructors definitions | Denys Vlasenko | 2009-08-04 | 1 | -3/+3 |
| | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||||
* | dumpoops: hopefully fix KerneloopsScanner plugin usage | Denys Vlasenko | 2009-08-04 | 2 | -4/+34 |
| | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||||
* | small fixes to dumpoops | Denys Vlasenko | 2009-07-31 | 1 | -1/+2 |
| | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||||
* | dumpoops: a new tool, requested by Anton | Denys Vlasenko | 2009-07-31 | 2 | -1/+60 |
| | | | | | | Now it segfaults, next commit will fix it Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||||
* | using more x-functions | Denys Vlasenko | 2009-07-31 | 1 | -2/+2 |
| | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||||
* | add utility functions | Denys Vlasenko | 2009-07-30 | 1 | -10/+13 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Logging machinery provided by this patch consists of several functions: +extern void error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); +extern void error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))); +extern void perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); +extern void perror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))); +/* This is a macro since it collides with log() from math.h */ +#undef log +#define log(...) error_msg(__VA_ARGS__) They are taking printf-style format strings. perror_msg_xxx functions append an errno string after the message: "xxx xxx xxx: No such file or directory" if errno is != 0. xxx_and_die functions do not return. All functions also ensure that the message ends with "\n", meaning that you do not need to add it into the message, but if you do, an extra "\n" will not be added. All functions ensure that the string is written in a single write() call, thus if two processes output to the same terminal or file, messages don't get intermingled. Ordinarily, messages go to the stderr. By setting global variable "logmode" to LOGMODE_SYSLOG or LOGMODE_NONE, they can be sent to syslog or be suppressed. Standard setting is LOGMODE_STDIO. LOGMODE_STDIO + LOGMODE_SYSLOG works too. Usually it is set by main() as needed, and then you can fearlessly use [p]error_msg[_and_die]() and be sure that message goes to the right place. +enum { + LOGMODE_NONE = 0, + LOGMODE_STDIO = (1 << 0), + LOGMODE_SYSLOG = (1 << 1), + LOGMODE_BOTH = LOGMODE_SYSLOG + LOGMODE_STDIO, +}; +extern int logmode; Exit code of xxx_and_die variants is controlled by the global variable +extern int xfunc_error_retval; By default it is = 1. Logging infrastructure uses a few other functions, which I find useful on their own, and since I discussed them with Zdenek and he thinks that they may be useful too, they are included in the patch also. The first group is "malloc or die" group: +void* malloc_or_warn(size_t size); +void* xmalloc(size_t size); +void* xrealloc(void *ptr, size_t size); +void* xzalloc(size_t size); +char* xstrdup(const char *s); +char* xstrndup(const char *s, int n); They are basically versions of malloc etc which exit on failure. The next group are simple I/O wrappers: +extern ssize_t safe_read(int fd, void *buf, size_t count); +extern ssize_t full_read(int fd, void *buf, size_t count); +extern void xread(int fd, void *buf, size_t count); +extern ssize_t safe_write(int fd, const void *buf, size_t count); +extern ssize_t full_write(int fd, const void *buf, size_t count); safe_xxx deal with the fact that read and write operations may "fail" with EINTR and in many cases we want to just repeat the operation. full_xxx deal with the fact that read and write are not guaranteed to read or write exact amount, they may to transfer less bytes. In this case we need to loop. The next group are the "x functions": +extern void xwrite(int fd, const void *buf, size_t count); +extern void xwrite_str(int fd, const char *str); +void xpipe(int filedes[2]); +void xdup2(int from, int to); +off_t xlseek(int fd, off_t offset, int whence); +void xsetenv(const char *key, const char *value); +int xsocket(int domain, int type, int protocol); +void xbind(int sockfd, struct sockaddr *my_addr, socklen_t addrlen); +void xlisten(int s, int backlog); +ssize_t xsendto(int s, const void *buf, size_t len, const struct sockaddr *to, socklen_t tolen); +void xstat(const char *name, struct stat *stat_buf); +void xmove_fd(int from, int to); +char* xasprintf(const char *format, ...); They are similar to xmalloc in a sense that they exit on the failure. Most of them closely resemble corresponding libc functions. xmove_fd() is a wrapper for typical idiom "if (fd1!=fd2) dup2(fd1,fd2)", with error checking on dup2 failure added. xasprintf() is a "strcat on steroids". It's a printf-like function which returns a malloced string. In my experience, it is surprisingly useful: it makes complex concatenations easy in C. All these functions are declared in a new header, inc/abrtlib.h. It also contains a list of #includes: +#include <ctype.h> +#include <dirent.h> +#include <errno.h> +#include <fcntl.h> +#include <inttypes.h> +#include <setjmp.h> +#include <signal.h> +#include <stdio.h> +#include <stdlib.h> +#include <stdarg.h> +#include <stddef.h> +#include <string.h> +#include <sys/poll.h> +#include <sys/mman.h> +#include <sys/socket.h> +#include <sys/stat.h> +#include <sys/time.h> +#include <sys/types.h> +#include <sys/wait.h> +#include <termios.h> +#include <time.h> +#include <unistd.h> +/* Try to pull in PATH_MAX */ +#include <limits.h> +#include <sys/param.h> +#ifndef PATH_MAX +# define PATH_MAX 256 +#endif +#include <pwd.h> +#include <grp.h> The rationale to do so is that these headers are pretty standard, and by having them included in this one file, we won't need to add #includes into many .c[pp] files later. The slowdown from gcc parsing these headers even if they are not needed is not worth spending time on optimizing out. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||||
* | Be more paranoid about /proc/.../core_pattern | Denys Vlasenko | 2009-07-25 | 1 | -0/+4 |
| | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||||
* | fixing whitespace damage, no code changes | Denys Vlasenko | 2009-07-25 | 1 | -2/+2 |
| | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||||
* | Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt | Jiri Moskovcak | 2009-07-22 | 1 | -17/+16 |
|\ | |||||
| * | fix several resource leaks on error paths | Denys Vlasenko | 2009-07-22 | 1 | -17/+16 |
| | | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||||
* | | PyHook: removed forgotten debug output | Jiri Moskovcak | 2009-07-22 | 1 | -1/+0 |
|/ | |||||
* | Removed dependency on rhpl | Jiri Moskovcak | 2009-07-20 | 1 | -2/+0 |
| | |||||
* | Fixed python hook to work with new DebugDump API | Jiri Moskovcak | 2009-06-30 | 2 | -6/+7 |
| | |||||
* | fixed security issue | Zdenek Prikryl | 2009-06-30 | 1 | -3/+2 |
| | | | | User can read only his debugdump directories | ||||
* | hook writes new dump only if the daemin is running | Zdenek Prikryl | 2009-06-17 | 2 | -1/+43 |
| | |||||
* | Fixed spec file, to work with new version | Jiri Moskovcak | 2009-06-15 | 2 | -1/+2 |
| | |||||
* | minu AT fixes for python addon | Zdenek Prikryl | 2009-06-03 | 1 | -4/+1 |
| | |||||
* | New hook for python apps | Jiri Moskovcak | 2009-06-02 | 4 | -0/+377 |
| | | | | - minor fixes in python analyzer | ||||
* | added item which tells what happens in gui | Zdenek Prikryl | 2009-05-13 | 1 | -0/+1 |
| | |||||
* | new commlayerinner interface | Zdenek Prikryl | 2009-04-28 | 2 | -7/+8 |
| | |||||
* | renamed MW library | Zdenek Prikryl | 2009-04-08 | 2 | -11/+20 |
| | | | | | | renamed Utils library added check for plugins init method renamed crash types | ||||
* | rewritten CDebugDump and CrashTypes | Zdenek Prikryl | 2009-04-01 | 1 | -18/+77 |
| | |||||
* | kerneloops - hook: remove | Anton Arapov | 2009-03-26 | 2 | -44/+1 |
| | | | | there is no need for hook so far. | ||||
* | replaced language and application plugins by analyzer plugin | Zdenek Prikryl | 2009-03-19 | 1 | -1/+1 |
| | | | | | added action plugin simplify plugin iface | ||||
* | added kerneloops addon and plugin (aarapov) | Jiri Moskovcak | 2009-03-11 | 2 | -2/+47 |
| | |||||
* | replace old project name by new one | Zdenek Prikryl | 2009-03-04 | 1 | -1/+1 |
| | |||||
* | Rewritten CCpp hook and removed dealock in DebugDumps lib (zprikryl) | Jiri Moskovcak | 2009-02-28 | 1 | -26/+28 |
| | |||||
* | added other signals | Zdenek Prikryl | 2009-02-26 | 1 | -1/+5 |
| | |||||
* | rewrote logging | Zdenek Prikryl | 2009-02-19 | 1 | -1/+3 |
| | |||||
* | new logic of getting package name | Zdenek Prikryl | 2009-02-18 | 1 | -1/+0 |
| | |||||
* | added syslog | Zdenek Prikryl | 2009-02-12 | 1 | -1/+8 |
| | |||||
* | added lock functionality to DebugDump | Zdenek Prikryl | 2009-02-12 | 1 | -0/+1 |
| |