From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) by sourceware.org (Postfix) with ESMTPS id 5ADDD3851A98 for ; Tue, 14 Jun 2022 14:56:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5ADDD3851A98 Received: by mail-qv1-xf2f.google.com with SMTP id i19so6593037qvu.13 for ; Tue, 14 Jun 2022 07:56:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=o6iFzRayMzqy/Q9ddg1eS5OFRBDh86pp4kJtSUSfZc0=; b=g8iNTmSS0sFGCIgkRj3kMn3PhwkH6WYZiWvKD9aUJfXrcTdVw93JChLM7fQlB+ipuU duXXfm3vzf3RPD1sJnnCqp0mjmFmMlur++licL0JP79BXka8b3TgeHsONetF9T4t+G9K wb+OqsJaVpwy2WGwwUBuVd1flxIimA61gCFDpNqQaD6Y/N+1qEr8idMJ0iQLECt0lWuf 5c52d0OgqqUDEwsFcn9+b4jOgFRrK45OXL7xQSPdsCzQFGsRsdY/qu+nPSX4wgt+rPbP k7BpyZ+2j4j2CRSJJjyKz7S7s6iiZOt90Akus4bFErxkYqc1Fis2vambHZPAzmWgc1HH iNRQ== X-Gm-Message-State: AJIora/+2SNb4jEMzh2w15Has05bNPPwiElue5MxyRbmwUroAqK+0WOS 6NSQKOWR3w6JndVp7cxs2HewI8jlKWm4ThKRgVoiFF4PItFshw== X-Google-Smtp-Source: AGRyM1scatdhe/tlELWU3bVRtGAHUu0QRPE4yHz6zFNlFFS+FxtYg7KO/xkecRq16gOa/vVxvwcF5wZWONzrQjcHCvI= X-Received: by 2002:a05:6214:1c88:b0:464:3801:63d7 with SMTP id ib8-20020a0562141c8800b00464380163d7mr3639400qvb.73.1655218585474; Tue, 14 Jun 2022 07:56:25 -0700 (PDT) MIME-Version: 1.0 From: Pranjal Goswami Date: Tue, 14 Jun 2022 20:26:14 +0530 Message-ID: Subject: Need help with adding a new service to nsswitch.conf To: libc-help@sourceware.org X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2022 14:56:28 -0000 Hi Friends , I am looking at adding another service in nsswitch.conf which can look for user presence in a file other than /etc/password. I have copied the files from nss_files to a new folder and I have made the changes in the Makefile under nss to get my module to build.. However I get an error when I try to build glibc. /../include/libc-symbols.h:34:32: warning: "MODULE_libnss_secmgr" is not defined, evaluates to 0 [-Wundef] 34 | #define IN_MODULE PASTE_NAME (MODULE_, MODULE_NAME) | ^~~~~~~ ./../include/libc-symbols.h:32:26: note: in definition of macro 'PASTE_NAME1' 32 | #define PASTE_NAME1(a,b) a##b | ^ ./../include/libc-symbols.h:34:20: note: in expansion of macro 'PASTE_NAME' 34 | #define IN_MODULE PASTE_NAME (MODULE_, MODULE_NAME) secmgr is the module that I am adding. I suspect that the problem is related to the line NSS_DECLARE_MODULE_FUNCTIONS (secmgr). So if we are adding a new service under nss , what additional things we need to do besides adding a module under nss and having teh same set of files as in nss/files - renamed to the new service that that am using? Thanks! Pranjal