[SSSD] [PATCH] AD-GPO: Store policy settings in local files

Yassir Elley yelley at redhat.com
Sat Jul 19 06:03:48 UTC 2014



----- Original Message -----
> On Sun, Jul 06, 2014 at 06:15:28AM -0400, Yassir Elley wrote:
> > Hi,
> > 
> > The attached patch implements a workflow change in which policy settings
> > retrieved by the gpo_child are stored in local files under the
> > /var/lib/sss/gpo_cache directory (where the full path is based on the
> > gpo's modified file_sys_path).
> > 
> > Before this patch, the gpo_child retrieved the smb data, parsed it into
> > policy settings, and returned the policy settings to the backend (i.e. no
> > local files were written). With this patch, in order to keep the gpo_child
> > as simple as possible, the gpo_child now simply retrieves the smb data and
> > stores it to a local file, which is later read by the backend and parsed
> > into policy settings by the backend.
> > 
> > Note that this patch does not add support for offline mode nor make use of
> > the sysdb cache, both of which will be implemented in a subsequent patch.
> > 
> > Regards,
> > Yassir.
> 
> sorry for the delay. I patch looks good and is working as expected.
> Please add the new gpo_cache directory to the spec file in the contrib
> directory.
> 
> During compilation I have seen the follwing warning:
> 
> ../src/providers/ad/ad_gpo.c: In function 'ad_gpo_process_cse_recv':
> ../src/providers/ad/ad_gpo.c:3263:14: warning: 'result' may be used
> uninitialized in this function [-Wmaybe-uninitialized]
>      uint32_t result;
>               ^
> The reason it that SAFEALIGN_COPY_UINT32_CHECK in
> parse_gpo_child_response() might fail and parse_gpo_child_response()
> returns EINVAL (*) in this case. Please check the return code of
> parse_gpo_child_response() and only use result if it is EOK.
> 
> bye,
> Sumit
> 
> (*) I agree that it is quite unexpected the macros call return and
> change the code flow. I guess we should open a ticket to fix this some
> time.

You suggested adding the new gpo_cache directory to the spec file in the contrib directory. I had already done that in the original patch. Was there something missing?

I have made the change to check the return code of parse_gpo_child_response. Revised patch attached.

Thanks,
Yassir.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-AD-GPO-Store-policy-settings-in-local-files.patch
Type: text/x-patch
Size: 45665 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20140719/4e2ab415/attachment.bin>


More information about the sssd-devel mailing list