From 1bc8c915e890c6a23a421c746e28202890165e96 Mon Sep 17 00:00:00 2001 From: Petr Písař Date: May 12 2011 12:00:32 +0000 Subject: Make dirname static to work with nss_db --- diff --git a/quota-4.00_pre1-Make-dirname-static.patch b/quota-4.00_pre1-Make-dirname-static.patch new file mode 100644 index 0000000..c9e368c --- /dev/null +++ b/quota-4.00_pre1-Make-dirname-static.patch @@ -0,0 +1,28 @@ +From 41974689e041dbe9625a2e1435b195ed5e94d40f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Thu, 12 May 2011 13:44:26 +0200 +Subject: [PATCH] Make dirname static + +The `dirname' variable name clashes with libc dirname(3). This could +cause edquota to segfault if name server switch is configured to use +`db' back-end that attempts to call dirname(3). +--- + edquota.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/edquota.c b/edquota.c +index 4d247fa..0d72882 100644 +--- a/edquota.c ++++ b/edquota.c +@@ -69,7 +69,7 @@ char *progname; + int flags, quotatype; + int fmt = -1; + char *protoname; +-char *dirname; ++static char *dirname; + + void usage(void) + { +-- +1.7.4.4 + diff --git a/quota.spec b/quota.spec index 9f5e781..ca9d156 100644 --- a/quota.spec +++ b/quota.spec @@ -5,7 +5,7 @@ Name: quota Summary: System administration tools for monitoring users' disk usage Epoch: 1 Version: 4.00 -Release: 0.14.pre1%{?dist} +Release: 0.15.pre1%{?dist} License: BSD and GPLv2+ URL: http://sourceforge.net/projects/linuxquota/ Group: System Environment/Base @@ -80,6 +80,8 @@ Patch30: quota-4.00_pre1-fix-repquota-to-get-latest-quota-info-header.patch Patch31: quota-4.00_pre1-Initialize-v2r1-ddquot-padding-in-dump.patch # In upstream 4.00_pre2 Patch32: quota-4.00_pre1-We-shouldn-t-pass-NULL-to-XGETQSTAT-quotactl-since-k.patch +# Submitted to upstream (SF#3300978), bug #703567 +Patch33: quota-4.00_pre1-Make-dirname-static.patch %description @@ -183,6 +185,7 @@ Linux/UNIX environment. %patch30 -p1 -b .repquota_latest_info %patch31 -p1 -b .initizalize_ddquot_paddding %patch32 -p1 -b .do_not_pass_null_to_XGETQSTAT +%patch33 -p1 -b .static_dirname # quotactl(2) moved into `man-pages' package (bug #640590) rm -f quotactl.2 # remove VCS files @@ -305,6 +308,9 @@ rm -rf %{buildroot} %changelog +* Thu May 12 2011 Petr Pisar - 1:4.00-0.15.pre1 +- Make dirname static to work with nss_db (bug #703567) + * Mon Apr 11 2011 Petr Pisar - 1:4.00-0.14.pre1 - Initialize v2r1 ddquot padding in dump (bug #695409) - Do not pass NULL to XGETQSTAT quotactl()