This commit is contained in:
parent
bd49b5291d
commit
29d6b9e423
118
pam_krb5-i18n.dif
Normal file
118
pam_krb5-i18n.dif
Normal file
@ -0,0 +1,118 @@
|
||||
Index: pam_krb5-2.2.22-1/configure.ac
|
||||
===================================================================
|
||||
--- pam_krb5-2.2.22-1.orig/configure.ac
|
||||
+++ pam_krb5-2.2.22-1/configure.ac
|
||||
@@ -444,6 +444,24 @@ AC_SUBST(TESTHOST)
|
||||
AC_SUBST(default_ccache_dir)
|
||||
AC_SUBST(default_ccname_template)
|
||||
|
||||
+AC_PATH_PROG(XGETTEXT, xgettext)
|
||||
+if test -z "$XGETTEXT" ; then
|
||||
+ AC_MSG_ERROR(xgettext is missing; please install gettext.)
|
||||
+fi
|
||||
+
|
||||
+AM_GNU_GETTEXT([external])
|
||||
+AM_GNU_GETTEXT_VERSION(0.16)
|
||||
+
|
||||
+AH_VERBATIM([_ZZENABLE_NLS],
|
||||
+ [#ifdef ENABLE_NLS
|
||||
+ #include <libintl.h>
|
||||
+ #define _(msgid) dgettext(PACKAGE, msgid)
|
||||
+ #define N_(msgid) msgid
|
||||
+ #else
|
||||
+ #define _(msgid) (msgid)
|
||||
+ #define N_(msgid) msgid
|
||||
+ #endif /* ENABLE_NLS */])
|
||||
+
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
@@ -467,4 +485,5 @@ tests/tools/klist_f
|
||||
tests/tools/klist_c
|
||||
tests/tools/klist_a
|
||||
tests/tools/klist_4
|
||||
+po/Makefile.in
|
||||
])
|
||||
Index: pam_krb5-2.2.22-1/Makefile.am
|
||||
===================================================================
|
||||
--- pam_krb5-2.2.22-1.orig/Makefile.am
|
||||
+++ pam_krb5-2.2.22-1/Makefile.am
|
||||
@@ -2,7 +2,7 @@ EXTRA_DIST = pam_krb5.spec TODO README R
|
||||
|
||||
CONFIGURE_DEPENDENCIES = $(top_srcdir)/pam_krb5.spec
|
||||
|
||||
-SUBDIRS = src tests
|
||||
+SUBDIRS = src tests po
|
||||
|
||||
VERSION=$(shell rpm -q --specfile $(top_srcdir)/pam_krb5.spec --qf '%{version}\n' | head -n1)
|
||||
RELEASE=$(shell rpm -q --specfile $(top_srcdir)/pam_krb5.spec --qf '%{release}\n' | head -n1)
|
||||
Index: pam_krb5-2.2.22-1/config.h.in
|
||||
===================================================================
|
||||
--- pam_krb5-2.2.22-1.orig/config.h.in
|
||||
+++ pam_krb5-2.2.22-1/config.h.in
|
||||
@@ -274,6 +274,19 @@
|
||||
#define PAM_KRB5_GNUC_PRINTF(__x,__y)
|
||||
#endif
|
||||
|
||||
+/* Define to 1 if translation of program messages to the user's native
|
||||
+ * language is requested. */
|
||||
+#undef ENABLE_NLS
|
||||
+
|
||||
+#ifdef ENABLE_NLS
|
||||
+#include <libintl.h>
|
||||
+#define _(msgid) dgettext(PACKAGE, msgid)
|
||||
+#define N_(msgid) msgid
|
||||
+#else
|
||||
+#define _(msgid) (msgid)
|
||||
+#define N_(msgid) msgid
|
||||
+#endif /* ENABLE_NLS */
|
||||
+
|
||||
|
||||
/* Define to the proper qualifier (either const or nothing) for your PAM
|
||||
implementation. */
|
||||
Index: pam_krb5-2.2.22-1/src/auth.c
|
||||
===================================================================
|
||||
--- pam_krb5-2.2.22-1.orig/src/auth.c
|
||||
+++ pam_krb5-2.2.22-1/src/auth.c
|
||||
@@ -283,7 +283,7 @@ pam_sm_authenticate(pam_handle_t *pamh,
|
||||
if ((retval != PAM_SUCCESS) &&
|
||||
(retval != PAM_USER_UNKNOWN) &&
|
||||
options->use_second_pass) {
|
||||
- i = _pam_krb5_prompt_for(pamh, "Password: ", &second_pass);
|
||||
+ i = _pam_krb5_prompt_for(pamh, _("Password: "), &second_pass);
|
||||
if ((i == PAM_SUCCESS) &&
|
||||
(flags & PAM_DISALLOW_NULL_AUTHTOK) &&
|
||||
(second_pass != NULL) &&
|
||||
Index: pam_krb5-2.2.22-1/src/password.c
|
||||
===================================================================
|
||||
--- pam_krb5-2.2.22-1.orig/src/password.c
|
||||
+++ pam_krb5-2.2.22-1/src/password.c
|
||||
@@ -257,7 +257,7 @@ pam_sm_chauthtok(pam_handle_t *pamh, int
|
||||
}
|
||||
if ((password == NULL) && (options->use_second_pass)) {
|
||||
/* Ask the user for a password. */
|
||||
- sprintf(prompt, "%s%sPassword: ",
|
||||
+ sprintf(prompt, _("%s%sPassword: "),
|
||||
options->banner,
|
||||
strlen(options->banner) > 0 ? " " : "");
|
||||
i = _pam_krb5_prompt_for(pamh, prompt, &password);
|
||||
@@ -345,10 +345,10 @@ pam_sm_chauthtok(pam_handle_t *pamh, int
|
||||
* okay with that, ask for one. */
|
||||
if ((password == NULL) && (retval == PAM_AUTHTOK_ERR)) {
|
||||
/* Ask for the new password twice. */
|
||||
- sprintf(prompt, "New %s%sPassword: ",
|
||||
+ sprintf(prompt, _("New %s%sPassword: "),
|
||||
options->banner,
|
||||
strlen(options->banner) > 0 ? " " : "");
|
||||
- sprintf(prompt2, "Repeat New %s%sPassword: ",
|
||||
+ sprintf(prompt2, _("Repeat New %s%sPassword: "),
|
||||
options->banner,
|
||||
strlen(options->banner) > 0 ? " " : "");
|
||||
i = _pam_krb5_prompt_for_2(pamh, prompt, &password,
|
||||
Index: pam_krb5-2.2.22-1/po/POTFILES.in
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ pam_krb5-2.2.22-1/po/POTFILES.in
|
||||
@@ -0,0 +1,2 @@
|
||||
+src/auth.c
|
||||
+src/password.c
|
3
pam_krb5-init-podir.tar.gz
Normal file
3
pam_krb5-init-podir.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6dec270f50da659fa6258bbbfa72e95d848ecd9846b76c941a2277337286baaa
|
||||
size 7308
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 13 18:24:31 CET 2008 - mc@suse.de
|
||||
|
||||
- add i18n support
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 11 13:37:46 CET 2008 - mc@suse.de
|
||||
|
||||
|
@ -19,13 +19,15 @@ Group: Productivity/Networking/Security
|
||||
Provides: pam_krb
|
||||
AutoReqProv: on
|
||||
Version: 2.2.22
|
||||
Release: 1
|
||||
Release: 10
|
||||
Summary: PAM Module for Kerberos Authentication
|
||||
Url: http://sourceforge.net/projects/pam-krb5/
|
||||
Source: pam_krb5-%{version}-%{PAM_RELEASE}.tar.bz2
|
||||
Source1: pam_krb5-init-podir.tar.gz
|
||||
Patch1: pam_krb5-2.2.0-0.5-configure_ac.dif
|
||||
Patch2: pam_krb5-2.2.11-1-refresh-drop-restore-priv.dif
|
||||
Patch3: pam_krb5-2.2.20-1-debug-log-choice.dif
|
||||
Patch4: pam_krb5-i18n.dif
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@ -41,9 +43,11 @@ Authors:
|
||||
|
||||
%prep
|
||||
%setup -q -n pam_krb5-%{version}-%{PAM_RELEASE}
|
||||
%setup -a 1 -T -D -n pam_krb5-%{version}-%{PAM_RELEASE}
|
||||
%patch1
|
||||
%patch2
|
||||
%patch3
|
||||
%patch4 -p1
|
||||
|
||||
%build
|
||||
%{suse_update_config -f}
|
||||
@ -60,11 +64,13 @@ make check
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
ln -sf pam_krb5.so $RPM_BUILD_ROOT/%_lib/security/pam_krb5afs.so
|
||||
rm -f $RPM_BUILD_ROOT/%_lib/security/*.la
|
||||
# Create filelist with translatins
|
||||
%{find_lang} pam_krb5
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%files -f pam_krb5.lang
|
||||
%defattr(444,root,root,755)
|
||||
%doc TODO README* COPYING* ChangeLog AUTHORS NEWS
|
||||
%attr(555,root,root) /%{_lib}/security/pam_krb5.so
|
||||
@ -75,6 +81,8 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%attr(755,root,root) /usr/bin/afs5log
|
||||
|
||||
%changelog
|
||||
* Thu Mar 13 2008 mc@suse.de
|
||||
- add i18n support
|
||||
* Mon Feb 11 2008 mc@suse.de
|
||||
- version 2.2.22
|
||||
* moved .k5login checks to a subprocess to avoid screwing with the
|
||||
|
Loading…
x
Reference in New Issue
Block a user