return auth_info->signing_state;
}
+void set_cmdline_auth_info_use_ccache(struct user_auth_info *auth_info, bool b)
+{
+ auth_info->use_ccache = b;
+}
+
+bool get_cmdline_auth_info_use_ccache(const struct user_auth_info *auth_info)
+{
+ return auth_info->use_ccache;
+}
+
void set_cmdline_auth_info_use_kerberos(struct user_auth_info *auth_info,
bool b)
{
char *p;
uid_t u;
- pass = getpwnam_alloc(talloc_autofree_context(), name);
+ pass = Get_Pwnam_alloc(talloc_autofree_context(), name);
if (pass) {
u = pass->pw_uid;
TALLOC_FREE(pass);
int str_checksum(const char *s)
{
- int res = 0;
- int c;
- int i=0;
-
- while(*s) {
- c = *s;
- res ^= (c << (i % 15)) ^ (c >> (15-(i%15)));
- s++;
- i++;
- }
- return(res);
+ TDB_DATA key = string_tdb_data(s);
+ return jenkins_hash(&key);
}
/*****************************************************************
return s;
}
+
+bool tevent_req_poll_ntstatus(struct tevent_req *req,
+ struct tevent_context *ev,
+ NTSTATUS *status)
+{
+ bool ret = tevent_req_poll(req, ev);
+ if (!ret) {
+ *status = map_nt_error_from_unix(errno);
+ }
+ return ret;
+}