From 777374243e15c53e7b0a7345e190c1018920be18 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Sat, 11 May 2013 10:53:12 +0200 Subject: Allow flat name in the FQname format https://fedorahosted.org/sssd/ticket/1648 Adds another expansion in the printf format that allows the user to use the domain flat name in the format. --- src/util/util.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/util/util.h') diff --git a/src/util/util.h b/src/util/util.h index 2f65fa201..87a4061e6 100644 --- a/src/util/util.h +++ b/src/util/util.h @@ -335,9 +335,14 @@ char *get_username_from_uid(TALLOC_CTX *mem_ctx, uid_t uid); char *get_uppercase_realm(TALLOC_CTX *memctx, const char *name); +#define FQ_FMT_NAME 0x01 +#define FQ_FMT_DOMAIN 0x02 +#define FQ_FMT_FLAT_NAME 0x04 + struct sss_names_ctx { char *re_pattern; char *fq_fmt; + uint8_t fq_flags; pcre *re; }; @@ -381,6 +386,10 @@ int sss_fqname(char *str, size_t size, struct sss_names_ctx *nctx, struct sss_domain_info *domain, const char *name); +size_t +sss_fqdom_len(struct sss_names_ctx *nctx, + struct sss_domain_info *domain); + /* from backup-file.c */ int backup_file(const char *src, int dbglvl); -- cgit