Giter VIP home page Giter VIP logo

members's People

Contributors

gebn avatar

Watchers

 avatar  avatar  avatar

members's Issues

Users who have both primary and secondary membership are printed twice

First, members scans passwd looking for primary members, and prints them. Then it retrieves the group from groups and prints all secondary members.

If a user has a given group as their primary group, and are also secondary members of the same group, their username will be printed twice.

Is this a bug or a feature? I'd argue a bug: being a member twice makes no difference to how membership functions. However, it is a breaking change.

still reachable: 88 bytes in 1 blocks

[cca-ug04-13060:/tmp/members-master]$ cat /etc/*os-release
CentOS Linux release 7.3.1611 (Core) 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

[cca-ug04-13060:/tmp/members-master]$ valgrind --tool=memcheck --leak-check=full --show-leak-kinds=all ./members audio
==19272== Memcheck, a memory error detector
==19272== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==19272== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==19272== Command: ./members audio
==19272== 
==19272== 
==19272== HEAP SUMMARY:
==19272==     in use at exit: 88 bytes in 1 blocks
==19272==   total heap usage: 68 allocs, 67 frees, 9,233 bytes allocated
==19272== 
==19272== 88 bytes in 1 blocks are still reachable in loss record 1 of 1
==19272==    at 0x4C29E2D: memalign (vg_replace_malloc.c:858)
==19272==    by 0x40010D8: tls_get_addr_tail (in /usr/lib64/ld-2.17.so)
==19272==    by 0x580D23E: ???
==19272==    by 0x4F3D258: __nss_getent_r (in /usr/lib64/libc-2.17.so)
==19272==    by 0x4EF0606: getpwent_r@@GLIBC_2.2.5 (in /usr/lib64/libc-2.17.so)
==19272==    by 0x4F3CD8D: __nss_getent (in /usr/lib64/libc-2.17.so)
==19272==    by 0x4EF0091: getpwent (in /usr/lib64/libc-2.17.so)
==19272==    by 0x400A47: print_primary_members (group.c:44)
==19272==    by 0x400CFA: handle_all_members (main.c:128)
==19272==    by 0x400EE4: main (main.c:209)
==19272== 
==19272== LEAK SUMMARY:
==19272==    definitely lost: 0 bytes in 0 blocks
==19272==    indirectly lost: 0 bytes in 0 blocks
==19272==      possibly lost: 0 bytes in 0 blocks
==19272==    still reachable: 88 bytes in 1 blocks
==19272==         suppressed: 0 bytes in 0 blocks
==19272== 
==19272== For counts of detected and suppressed errors, rerun with: -v
==19272== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
[cca-ug04-13060:/tmp/members-master]$ echo $?
4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.