diff options
| author | Karel Klic <kklic@redhat.com> | 2009-11-30 15:07:45 +0100 |
|---|---|---|
| committer | Karel Klic <kklic@redhat.com> | 2009-11-30 15:07:45 +0100 |
| commit | c6fef68305a7bc2df55afc4d682317a05a8dfe97 (patch) | |
| tree | 0332579a85acd6530b8b9dcbf29dc56187b565ea /lib/Utils/xfuncs.cpp | |
| parent | f58611ea5957462e6be40950684a56579a2459a6 (diff) | |
| parent | f0bd70b3f68835983a10052337fc316a9f861811 (diff) | |
| download | abrt-c6fef68305a7bc2df55afc4d682317a05a8dfe97.tar.gz abrt-c6fef68305a7bc2df55afc4d682317a05a8dfe97.tar.xz abrt-c6fef68305a7bc2df55afc4d682317a05a8dfe97.zip | |
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'lib/Utils/xfuncs.cpp')
| -rw-r--r-- | lib/Utils/xfuncs.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Utils/xfuncs.cpp b/lib/Utils/xfuncs.cpp index 97c2f76..4b208a9 100644 --- a/lib/Utils/xfuncs.cpp +++ b/lib/Utils/xfuncs.cpp @@ -368,3 +368,14 @@ bool string_to_bool(const char *s) return true; return false; } + +bool xgetpwnam(const char* login, uid_t *uid) +{ + struct passwd* pwd = getpwnam(login); + if (pwd == NULL) + return false; + + *uid = pwd->pw_uid; + return true; +} + |
