diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2012-01-06 13:56:34 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-01-14 11:53:29 -0500 |
commit | 22c7230dc0c8d41a189eb758be78991d183de1f7 (patch) | |
tree | 9b5bb11dcf31e98d104071dbb0b5042708ca1040 /src/sss_client/sss_cli.h | |
parent | 394f8a24f5794bced737cfb743fe038fb4d0f4a6 (diff) | |
download | sssd-22c7230dc0c8d41a189eb758be78991d183de1f7.tar.gz sssd-22c7230dc0c8d41a189eb758be78991d183de1f7.tar.xz sssd-22c7230dc0c8d41a189eb758be78991d183de1f7.zip |
NSS: Validate input string lengths
Also fixes a return value bug where we were returning errno error
codes instead of nss_status codes.
Fixes https://fedorahosted.org/sssd/ticket/1135
Diffstat (limited to 'src/sss_client/sss_cli.h')
-rw-r--r-- | src/sss_client/sss_cli.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sss_client/sss_cli.h b/src/sss_client/sss_cli.h index f9bbda98e..dc15ac13b 100644 --- a/src/sss_client/sss_cli.h +++ b/src/sss_client/sss_cli.h @@ -29,6 +29,7 @@ #include <pwd.h> #include <grp.h> #include <string.h> +#include <limits.h> #ifndef HAVE_ERRNO_T #define HAVE_ERRNO_T @@ -39,6 +40,12 @@ typedef int errno_t; #define SSS_PAM_PROTOCOL_VERSION 3 #define SSS_SUDO_PROTOCOL_VERSION 0 +#ifdef LOGIN_NAME_MAX +#define SSS_NAME_MAX LOGIN_NAME_MAX +#else +#define SSS_NAME_MAX 256 +#endif + /** * @defgroup sss_cli_command SSS client commands * @{ |