modules_path(talloc_tos(),SAMBA_SUBSYSTEM_GPEXT) returns '/usr/local/samba/lib/gpext' which does not exist

Amit Kumar amitkuma at redhat.com
Mon Jul 8 13:40:10 UTC 2019


Hello,
char *modules_path(TALLOC_CTX *mem_ctx, const char *name)
{
        return talloc_asprintf(mem_ctx, "%s/%s", get_dyn_MODULESDIR(),
name);
}

get_dyn_MODULESDIR()?
# vim ./buildtools/wafsamba/wscript
    opt.add_option('--with-modulesdir',
                   help=("modules directory [PREFIX/modules]"),
                   action="store", dest='MODULESDIR',
default='${PREFIX}/modules')

# make show_waf_options
   --with-modulesdir=MODULESDIR
    --with-pammodulesdir=PAMMODULESDIR

if i provide /usr/local/samba/lib/private/ then also gpext inside it
does not exist!

Thanks
Amit

On 07/08/2019 06:27 PM, Amit Kumar wrote:
> Hello,
>
> While I was looking at source for:
>
> # /usr/local/samba/bin/net ads gpo apply <username> <client-side-extension>
>
> These are steps followed:
>                 argv[0]=AD-User-name, argv[1]=Client-Side-Extension
>                 Step-1: Retrieve GUID of CSE using
> cse_gpo_name_to_guid_string [filter=GUID_of_CSE] -> OK
>                 Step-2: ads_startup() ->  OK
>                 Step-3: ads_find_samaccount(argv[0], &uac, &dn) Finds
> dn, userAccessControl value for username entered -> OK
>                 Step-4: ads_get_gpo_list(dn, token, &gpo_list) retrieves
> gpo_list on basis of dn,token. [gpo_list=GPOs_of_dn] -> OK
>                 Step-5: gpo_process_gpo_list(token, gpo_list, filter)
>                     5a: gp_init_reg_ctx(KEY_HKCU,
> REG_KEY_WRITE,token,**reg_ctx); [Get values filled in struct
> gp_registry_context] -> OK
>                     5b:
> gpext_process_extension(token,flags,root_key,filter,gpo_list)
>                         5b1: gpext_init_gp_extensions(mem_ctx)
>                              5b1-1: gp_glob_ext_list() it calls
> 'modules_path(talloc_tos(),SAMBA_SUBSYSTEM_GPEXT)'
>
> libgpo/gpext/gpext.c
> modules_path(talloc_tos(),SAMBA_SUBSYSTEM_GPEXT)  returns
> '/usr/local/samba/lib/gpext' which does not exist
>
> Queries:
> 1. Where is definition modules_path()?
> 2. Is path returned by modules_path() is correct?
> 3. Shouldn't we provide 2nd argument to 'net ads gpo apply
> <user|machine-dn> <gpo>' as new GPO to be applied to user or machine
> account?
>  -> why client side extension's GUID need to be provided?
>
> Thanks
> Amit
>




More information about the samba-technical mailing list