summaryrefslogtreecommitdiffstats
path: root/src/tools/sss_override.c
Commit message (Collapse)AuthorAgeFilesLines
* TOOLS: Some tools command might not need initialization to succeedJakub Hrozek2016-07-071-13/+13
| | | | | | | | | | | | Since we want to use the sssctl tool during upgrade, we need to amend the tools initialization code to not error out if sysdb can't be instantiated, but rather return errno and let the tool handle the error. Each tool command now has a 'allowed errno' the command is able to handle. In this patch iteration, only a single errno can be handled and only the upgrade command is able to do so. Reviewed-by: Sumit Bose <sbose@redhat.com>
* SSS_OVERRIDE: Fixes for fully qualified namesJakub Hrozek2016-07-071-61/+85
| | | | | | | | | Use sss_create_internal_fqname for internal cache lookups. Because the object's existence is verified using getpw* and getgr*, we keep using sss_tc_fqname there, just to feed the NSS interface the expected qualified or unqualified name format. Reviewed-by: Sumit Bose <sbose@redhat.com>
* sss_override: return EXIT_FAILURE if file does not exist during importPavel Březina2016-06-271-0/+2
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* sss_override: return EXIT_SUCCESS even when no overrides are foundPavel Březina2016-06-271-1/+6
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* sss_tools: return errno_t instead of system codePavel Březina2016-06-271-112/+88
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* sss_tools: tell whether an option was providedPavel Březina2016-06-271-4/+5
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* sss_tools: add command descriptionPavel Březina2016-06-271-13/+13
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* sss_override: add certificate supportSumit Bose2016-06-091-5/+33
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* sss_override: only add domain if name is not fully qualifiedSumit Bose2016-04-131-1/+27
| | | | | | | Resolves: https://fedorahosted.org/sssd/ticket/2989 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* sss_override: do not generate DN, search objectSumit Bose2016-04-131-7/+27
| | | | | | | | | | | | DNs of existing objects can not be generate reliable because the use of fully qualified names and upper and lower cases in names has to be considered. The most reliable way to get the DN is to search the object and take the DN from the result. Resolves: https://fedorahosted.org/sssd/ticket/2989 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* tools: Don't shadow 'exit'Jakub Hrozek2015-11-101-18/+18
| | | | | | | | | | | | Fixes: /sssd/src/tools/sss_override.c: In function ‘override_user_import’: /sssd/src/tools/sss_override.c:1471: warning: declaration of ‘exit’ shadows a global declaration /usr/include/stdlib.h:544: warning: shadowed declaration is here /sssd/src/tools/sss_override.c: In function ‘override_group_import’: /sssd/src/tools/sss_override.c:1737: warning: declaration of ‘exit’ shadows a global declaration /usr/include/stdlib.h:544: warning: shadowed declaration is here Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* sss_override: use more generic help textPavel Březina2015-10-301-2/+1
| | | | Reviewed-by: Pavel Reichl <preichl@redhat.com>
* sss_override: do not free ldb_dn in get_object_dn()Pavel Březina2015-10-301-9/+29
| | | | | | | When only str_dn is requested, ldb_dn is freed. This triggers access after free since str_dn is part of ldb_dn talloc context. Reviewed-by: Pavel Reichl <preichl@redhat.com>
* sss_override: add group-showPavel Březina2015-10-301-6/+91
| | | | | | | Resolves: https://fedorahosted.org/sssd/ticket/2736 Reviewed-by: Pavel Reichl <preichl@redhat.com>
* sss_override: add user-showPavel Březina2015-10-301-8/+105
| | | | | | | Resolves: https://fedorahosted.org/sssd/ticket/2736 Reviewed-by: Pavel Reichl <preichl@redhat.com>
* sss_override: add group-findPavel Březina2015-10-301-49/+101
| | | | | | | Resolves: https://fedorahosted.org/sssd/ticket/2736 Reviewed-by: Pavel Reichl <preichl@redhat.com>
* sss_override: add user-findPavel Březina2015-10-301-53/+141
| | | | | | | Resolves: https://fedorahosted.org/sssd/ticket/2736 Reviewed-by: Pavel Reichl <preichl@redhat.com>
* sss_override: fix exporting multiple domainsPavel Březina2015-10-301-2/+2
| | | | | | | There was a mistake in the code which resulted in exporting one domain several times if multiple domain were configured. Reviewed-by: Pavel Reichl <preichl@redhat.com>
* util: Update get_next_domain's interfaceMichal Židek2015-10-231-2/+2
| | | | | | | | | | | | Update get next domain to be able to include disbled domains and change the interface to accept flags instead of multiple booleans. Ticket: https://fedorahosted.org/sssd/ticket/2673 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* sss_override: Remove unused parameter tool_ctxPavel Reichl2015-10-211-6/+4
| | | | Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* sss_override: steal msgs string to objsPavel Březina2015-10-081-0/+9
| | | | | | | | | | Since msgs is attached to tmp_ctx then all the strings are freed with tmp_ctx. Now steal the strings to objs. Resolves: https://fedorahosted.org/sssd/ticket/2826 Reviewed-by: Pavel Reichl <preichl@redhat.com>
* sss_override: explicitly set ret = EOKPavel Březina2015-10-081-0/+2
| | | | Reviewed-by: Pavel Reichl <preichl@redhat.com>
* sss_override: fix comment describing formatPavel Březina2015-10-081-1/+1
| | | | Reviewed-by: Pavel Reichl <preichl@redhat.com>
* sss tools: improve option handlingPavel Březina2015-10-021-2/+0
| | | | | | | | | | | | The crash describe by ticket #2802 is caused by providing NULL options in popt and yet trying to iterate over them. Instead of simply testing for NULL this patch creates a new option table table merges several option tables together, thus improving and simplifying usage string. Resolves: https://fedorahosted.org/sssd/ticket/2802 Reviewed-by: Pavel Reichl <preichl@redhat.com>
* sss_override: support fqn in override namePavel Březina2015-09-161-18/+93
| | | | | | | Resolves: https://fedorahosted.org/sssd/ticket/2782 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* sss_override: support import and exportPavel Březina2015-08-201-3/+585
| | | | | | | Resolves: https://fedorahosted.org/sssd/ticket/2737 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* sss_override: decompose code betterPavel Březina2015-08-201-109/+181
| | | | | | | Preparation for: https://fedorahosted.org/sssd/ticket/2737 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* sss_override: support domains that require fqnamePavel Březina2015-08-201-2/+57
| | | | | | | Resolves: https://fedorahosted.org/sssd/ticket/2757 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* sss_override: print input name if unable to parse itPavel Březina2015-08-201-1/+1
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* TOOLS: add sss_override for local overridesPavel Březina2015-07-271-0/+718
Resolves: https://fedorahosted.org/sssd/ticket/2584 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>