diff options
| author | Nikita Karetnikov <nikita@karetnikov.org> | 2012-11-23 23:00:50 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2012-11-24 00:35:33 +0100 |
| commit | 5b2fd61868dfeeb60ec5252f86f46d6995a869b2 (patch) | |
| tree | 0c0c7da169007c68b5fddb0f9ff2e33002bf3041 /distro | |
| parent | 36d4d49e694f87aa950101724800171baa74f8b3 (diff) | |
distro: Add GNU Shishi.
* distro/packages/shishi.scm,
distro/packages/patches/shishi-gets-undeclared.patch: New files.
* Makefile.am (MODULES): Add 'shishi.scm'.
(dist_patch_DATA): Add 'shishi-gets-undeclared.patch'.
Diffstat (limited to 'distro')
| -rw-r--r-- | distro/packages/patches/shishi-gets-undeclared.patch | 71 | ||||
| -rw-r--r-- | distro/packages/shishi.scm | 69 |
2 files changed, 140 insertions, 0 deletions
diff --git a/distro/packages/patches/shishi-gets-undeclared.patch b/distro/packages/patches/shishi-gets-undeclared.patch new file mode 100644 index 00000000000..a3d6d0cca20 --- /dev/null +++ b/distro/packages/patches/shishi-gets-undeclared.patch | |||
| @@ -0,0 +1,71 @@ | |||
| 1 | This patch is needed to allow builds with newer versions of | ||
| 2 | the GNU libc (2.16+). | ||
| 3 | |||
| 4 | |||
| 5 | commit 66712c23388e93e5c518ebc8515140fa0c807348 | ||
| 6 | Author: Eric Blake <eblake@redhat.com> | ||
| 7 | Date: Thu Mar 29 13:30:41 2012 -0600 | ||
| 8 | |||
| 9 | stdio: don't assume gets any more | ||
| 10 | |||
| 11 | Gnulib intentionally does not have a gets module, and now that C11 | ||
| 12 | and glibc have dropped it, we should be more proactive about warning | ||
| 13 | any user on a platform that still has a declaration of this dangerous | ||
| 14 | interface. | ||
| 15 | |||
| 16 | * m4/stdio_h.m4 (gl_STDIO_H, gl_STDIO_H_DEFAULTS): Drop gets | ||
| 17 | support. | ||
| 18 | * modules/stdio (Makefile.am): Likewise. | ||
| 19 | * lib/stdio-read.c (gets): Likewise. | ||
| 20 | * tests/test-stdio-c++.cc: Likewise. | ||
| 21 | * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Fix comment. | ||
| 22 | * lib/stdio.in.h (gets): Make warning occur in more places. | ||
| 23 | * doc/posix-functions/gets.texi (gets): Update documentation. | ||
| 24 | Reported by Christer Solskogen. | ||
| 25 | |||
| 26 | Signed-off-by: Eric Blake <eblake@redhat.com> | ||
| 27 | |||
| 28 | diff --git a/gl/stdio.in.h b/gl/stdio.in.h | ||
| 29 | index aa7b599..c377b6e 100644 | ||
| 30 | --- a/gl/stdio.in.h | ||
| 31 | +++ b/gl/stdio.in.h | ||
| 32 | @@ -698,22 +698,11 @@ _GL_WARN_ON_USE (getline, "getline is unportable - " | ||
| 33 | # endif | ||
| 34 | #endif | ||
| 35 | |||
| 36 | -#if @GNULIB_GETS@ | ||
| 37 | -# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ | ||
| 38 | -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 39 | -# undef gets | ||
| 40 | -# define gets rpl_gets | ||
| 41 | -# endif | ||
| 42 | -_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1))); | ||
| 43 | -_GL_CXXALIAS_RPL (gets, char *, (char *s)); | ||
| 44 | -# else | ||
| 45 | -_GL_CXXALIAS_SYS (gets, char *, (char *s)); | ||
| 46 | -# undef gets | ||
| 47 | -# endif | ||
| 48 | -_GL_CXXALIASWARN (gets); | ||
| 49 | /* It is very rare that the developer ever has full control of stdin, | ||
| 50 | - so any use of gets warrants an unconditional warning. Assume it is | ||
| 51 | - always declared, since it is required by C89. */ | ||
| 52 | + so any use of gets warrants an unconditional warning; besides, C11 | ||
| 53 | + removed it. */ | ||
| 54 | +#undef gets | ||
| 55 | +#if HAVE_RAW_DECL_GETS | ||
| 56 | _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); | ||
| 57 | #endif | ||
| 58 | |||
| 59 | @@ -1053,9 +1042,9 @@ _GL_WARN_ON_USE (snprintf, "snprintf is unportable - " | ||
| 60 | # endif | ||
| 61 | #endif | ||
| 62 | |||
| 63 | -/* Some people would argue that sprintf should be handled like gets | ||
| 64 | - (for example, OpenBSD issues a link warning for both functions), | ||
| 65 | - since both can cause security holes due to buffer overruns. | ||
| 66 | +/* Some people would argue that all sprintf uses should be warned about | ||
| 67 | + (for example, OpenBSD issues a link warning for it), | ||
| 68 | + since it can cause security holes due to buffer overruns. | ||
| 69 | However, we believe that sprintf can be used safely, and is more | ||
| 70 | efficient than snprintf in those safe cases; and as proof of our | ||
| 71 | belief, we use sprintf in several gnulib modules. So this header | ||
diff --git a/distro/packages/shishi.scm b/distro/packages/shishi.scm new file mode 100644 index 00000000000..3a71dc3c970 --- /dev/null +++ b/distro/packages/shishi.scm | |||
| @@ -0,0 +1,69 @@ | |||
| 1 | ;;; Guix --- Nix package management from Guile. -*- coding: utf-8 -*- | ||
| 2 | ;;; Copyright (C) 2012 Nikita Karetnikov <nikita@karetnikov.org> | ||
| 3 | ;;; Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org> | ||
| 4 | ;;; | ||
| 5 | ;;; This file is part of Guix. | ||
| 6 | ;;; | ||
| 7 | ;;; Guix is free software; you can redistribute it and/or modify it | ||
| 8 | ;;; under the terms of the GNU General Public License as published by | ||
| 9 | ;;; the Free Software Foundation; either version 3 of the License, or (at | ||
| 10 | ;;; your option) any later version. | ||
| 11 | ;;; | ||
| 12 | ;;; Guix is distributed in the hope that it will be useful, but | ||
| 13 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | ;;; GNU General Public License for more details. | ||
| 16 | ;;; | ||
| 17 | ;;; You should have received a copy of the GNU General Public License | ||
| 18 | ;;; along with Guix. If not, see <http://www.gnu.org/licenses/>. | ||
| 19 | |||
| 20 | (define-module (distro packages shishi) | ||
| 21 | #:use-module (distro) | ||
| 22 | #:use-module (distro packages gnutls) | ||
| 23 | #:use-module (distro packages gnupg) | ||
| 24 | #:use-module (distro packages compression) | ||
| 25 | #:use-module (guix packages) | ||
| 26 | #:use-module (guix download) | ||
| 27 | #:use-module (guix build-system gnu)) | ||
| 28 | |||
| 29 | (define-public shishi | ||
| 30 | (package | ||
| 31 | (name "shishi") | ||
| 32 | (version "1.0.1") | ||
| 33 | (source | ||
| 34 | (origin | ||
| 35 | (method url-fetch) | ||
| 36 | (uri (string-append | ||
| 37 | "mirror://gnu/shishi/shishi-" | ||
| 38 | version | ||
| 39 | ".tar.gz")) | ||
| 40 | (sha256 | ||
| 41 | (base32 | ||
| 42 | "13c6w9rpaqb3am65nrn86byvmll5r78pld2vb0i68491vww4fzlx")))) | ||
| 43 | (build-system gnu-build-system) | ||
| 44 | (arguments | ||
| 45 | `(#:make-flags | ||
| 46 | '("CPPFLAGS=-DMAX_ERROR_DESCRIPTION_SIZE=ASN1_MAX_ERROR_DESCRIPTION_SIZE") | ||
| 47 | #:patches (list (assoc-ref %build-inputs | ||
| 48 | "patch/gets")))) | ||
| 49 | (inputs | ||
| 50 | `(("gnutls" ,gnutls) | ||
| 51 | ("zlib" ,zlib) | ||
| 52 | ("libgcrypt" ,libgcrypt) | ||
| 53 | ("libtasn1" ,libtasn1) | ||
| 54 | ("patch/gets" ,(search-patch "shishi-gets-undeclared.patch")))) | ||
| 55 | (home-page "http://www.gnu.org/software/shishi/") | ||
| 56 | (synopsis | ||
| 57 | "GNU Shishi, free implementation of the Kerberos 5 network security system") | ||
| 58 | (description | ||
| 59 | " GNU Shishi is an implementation of the Kerberos 5 network | ||
| 60 | authentication system, as specified in RFC 4120. Shishi can be | ||
| 61 | used to authenticate users in distributed systems. | ||
| 62 | |||
| 63 | Shishi contains a library (`libshishi') that can be used by | ||
| 64 | application developers to add support for Kerberos 5. Shishi | ||
| 65 | contains a command line utility (1shishi') that is used by | ||
| 66 | users to acquire and manage tickets (and more). The server | ||
| 67 | side, a Key Distribution Center, is implemented by `shishid'. | ||
| 68 | ") | ||
| 69 | (license "GPLv3+"))) ; some files are under GPLv2+ | ||
