proxy_services.c revision aec5785126354bd8b192f63fe04ea08dae9c0705
/*
SSSD
Authors:
Stephen Gallagher <sgallagh@redhat.com>
Copyright (C) 2012 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "util/strtonum.h"
#include "db/sysdb_services.h"
#define BUFLEN 1024
bool lowercase,
{
char *cased_name;
const char **protocols;
const char **cased_aliases;
size_t num_aliases, i;
if (!cased_name) {
goto done;
}
if (!protocols) {
goto done;
}
!lowercase);
if (!protocols[0]) {
goto done;
}
/* Count the aliases */
if (num_aliases >= 1) {
if (!cased_aliases) {
goto done;
}
for (i = 0; i < num_aliases; i++) {
!lowercase);
if (!cased_aliases[i]) {
goto done;
}
}
} else {
}
now);
done:
return ret;
}
struct sss_domain_info *dom,
const char *name,
const char *protocol)
{
enum nss_status status;
if (!result) {
goto done;
}
("getservbyname_r failed for service [%s].\n", name));
return ret;
}
if (status == NSS_STATUS_NOTFOUND) {
/* Make sure we remove it from the cache */
} else {
/* Results found. Save them into the cache */
}
done:
return ret;
}
struct sss_domain_info *dom,
const char *be_filter,
const char *protocol)
{
enum nss_status status;
if (!result) {
goto done;
}
errno = 0;
if (errno) {
goto done;
}
("getservbyport_r failed for service [%s].\n", be_filter));
return ret;
}
if (status == NSS_STATUS_NOTFOUND) {
/* Make sure we remove it from the cache */
} else {
/* Results found. Save them into the cache */
}
done:
return ret;
}