From patchwork Sat Feb 2 10:17:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 2083651 Return-Path: X-Original-To: patchwork-cifs-client@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 727F2DF264 for ; Sat, 2 Feb 2013 10:17:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754959Ab3BBKR5 (ORCPT ); Sat, 2 Feb 2013 05:17:57 -0500 Received: from mail-gh0-f173.google.com ([209.85.160.173]:37205 "EHLO mail-gh0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754586Ab3BBKR4 (ORCPT ); Sat, 2 Feb 2013 05:17:56 -0500 Received: by mail-gh0-f173.google.com with SMTP id g2so1204566ghb.4 for ; Sat, 02 Feb 2013 02:17:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=3AnMvYrG7uxOwrxP/fF+g+XHPfl5dCTN9k256zU3rQY=; b=cJG9zw/FBPNz98s2a4Mx0Tu/cgk6lyJElSNdoZCoJ2Mu9ZWqiHvc7zhj3JTgQtWGUm BOnCtyYzzQw6CoSGUD+eq5miETcIdHyHanfcl6ByrSodhG8lnaVykgeTsX9xqQJ6rjlx ejFjjQd0QyrI8aTMFIXgQA600dWIXESMuFYguRcskBKQ31FDp1kqcskhJI0Mzrffelw3 EEchG6SVSuNu+NDb5yEBx/H1i+nii/ZitqR9XeVMKkYYq970Y4WblzjGgfVY7xIWu+w0 uJQlz6bq4yI4Q51/iiNhcWzw2Oi7ZM36rfazTysTE2Ie06sI+hcKkVH1IAeHVkCiq33X t4bA== X-Received: by 10.236.59.98 with SMTP id r62mr18672945yhc.130.1359800275872; Sat, 02 Feb 2013 02:17:55 -0800 (PST) Received: from salusa.poochiereds.net (cpe-107-015-113-143.nc.res.rr.com. [107.15.113.143]) by mx.google.com with ESMTPS id x16sm18339887yhj.6.2013.02.02.02.17.53 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 02 Feb 2013 02:17:54 -0800 (PST) From: Jeff Layton To: linux-cifs@vger.kernel.org Cc: shirishpargaonkar@gmail.com Subject: [PATCH v2] cifs-utils: add autoconf test to make sure that libwbclient is usable Date: Sat, 2 Feb 2013 05:17:49 -0500 Message-Id: <1359800269-27502-1-git-send-email-jlayton@samba.org> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: References: X-Gm-Message-State: ALoCoQlkoa78zcJ0T5pdnjZUR9euTmbNGfXeJBCgqVDVtKdHuadgqr+efBL1gDdcl2rfBHe0VSwA Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org The idmapwb plugin requires a usable wbcSidsToUnixIds() function. Check to ensure that the wbclient library provides that symbol, and handle it appropriately if it doesn't. If someone were so inclined they probably could fix idmapwb to fall back to the older mapping functions if that symbol doesn't exist, but for now this patch just makes it refuse to build the plugin. Reported-by: Shirish Pargaonkar Signed-off-by: Jeff Layton --- aclocal/idmap.m4 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/aclocal/idmap.m4 b/aclocal/idmap.m4 index 939a901..c5727f6 100644 --- a/aclocal/idmap.m4 +++ b/aclocal/idmap.m4 @@ -19,6 +19,26 @@ if test $enable_cifsidmap != "no" -o $enable_cifsacl != "no"; then ]) fi +if test $enable_cifsacl != "no" -o $enable_cifsacl != "no"; then + ac_wbc_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $WBCLIENT_LIBS" + AC_CHECK_LIB(wbclient, wbcSidsToUnixIds, , [ + if test "$enable_cifsidmap" = "yes"; then + AC_MSG_ERROR([wbclient library lacks wbcSidsToUnixIds().]) + else + AC_MSG_WARN([wbclient library lacks wbcSidsToUnixIds(). Disabling cifs.idmap.]) + enable_cifsidmap="no" + fi + if test "$enable_cifsacl" = "yes"; then + AC_MSG_ERROR([wbclient library lacks wbcSidsToUnixIds.]) + else + AC_MSG_WARN([wbclient library lacks wbcSidsToUnixIds(). Disabling cifsacl tools.]) + enable_cifsacl="no" + fi + ]) + LDFLAGS=$ac_wbc_save_LDFLAGS +fi + if test $enable_cifsacl != "no"; then AC_CHECK_HEADERS([sys/xattr.h], , [ if test "$enable_cifsacl" = "yes"; then