Sha256: 310875e3bf8b956b1ff847f7262c897cc8c842ce1c443b3085f0d3cd6061b067

Contents?: true

Size: 555 Bytes

Versions: 20

Compression:

Stored size: 555 Bytes

Contents

# frozen_string_literal: true
require_relative '../../../puppet/ffi/posix'

module Puppet::FFI::POSIX
  module Functions

    extend FFI::Library

    ffi_convention :stdcall

    # https://man7.org/linux/man-pages/man3/getgrouplist.3.html
    # int getgrouplist (
    #   const char *user,
    #   gid_t group,
    #   gid_t *groups,
    #   int *ngroups
    # );
    begin
      ffi_lib FFI::Library::LIBC
      attach_function :getgrouplist, [:string, :uint, :pointer, :pointer], :int
    rescue FFI::NotFoundError
      # Do nothing
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
puppet-8.3.0 lib/puppet/ffi/posix/functions.rb
puppet-8.3.0-x86-mingw32 lib/puppet/ffi/posix/functions.rb
puppet-8.3.0-x64-mingw32 lib/puppet/ffi/posix/functions.rb
puppet-8.3.0-universal-darwin lib/puppet/ffi/posix/functions.rb
puppet-8.3.1 lib/puppet/ffi/posix/functions.rb
puppet-8.3.1-x86-mingw32 lib/puppet/ffi/posix/functions.rb
puppet-8.3.1-x64-mingw32 lib/puppet/ffi/posix/functions.rb
puppet-8.3.1-universal-darwin lib/puppet/ffi/posix/functions.rb
puppet-8.2.0 lib/puppet/ffi/posix/functions.rb
puppet-8.2.0-x86-mingw32 lib/puppet/ffi/posix/functions.rb
puppet-8.2.0-x64-mingw32 lib/puppet/ffi/posix/functions.rb
puppet-8.2.0-universal-darwin lib/puppet/ffi/posix/functions.rb
puppet-8.1.0 lib/puppet/ffi/posix/functions.rb
puppet-8.1.0-x86-mingw32 lib/puppet/ffi/posix/functions.rb
puppet-8.1.0-x64-mingw32 lib/puppet/ffi/posix/functions.rb
puppet-8.1.0-universal-darwin lib/puppet/ffi/posix/functions.rb
puppet-8.0.1 lib/puppet/ffi/posix/functions.rb
puppet-8.0.1-x86-mingw32 lib/puppet/ffi/posix/functions.rb
puppet-8.0.1-x64-mingw32 lib/puppet/ffi/posix/functions.rb
puppet-8.0.1-universal-darwin lib/puppet/ffi/posix/functions.rb