summaryrefslogtreecommitdiff
path: root/source3/smbd/service.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/service.c')
-rw-r--r--source3/smbd/service.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index 4daa2924a2..1c46e3776c 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -312,14 +312,7 @@ static int load_registry_service(const char *servicename)
TALLOC_FREE(value);
}
- if (!service_ok(res)) {
- /* this is actually never reached, since
- * service_ok only returns False if the service
- * entry does not have a service name, and we _know_
- * we do have a service name here... */
- res = -1;
- }
-
+ res = 0;
error:
TALLOC_FREE(key);
@@ -409,6 +402,10 @@ int find_service(fstring service)
if (iService < 0) {
}
+ if (iService < 0) {
+ iService = load_registry_service(service);
+ }
+
/* Is it a usershare service ? */
if (iService < 0 && *lp_usershare_path()) {
/* Ensure the name is canonicalized. */
@@ -444,10 +441,6 @@ int find_service(fstring service)
}
}
- if (iService < 0) {
- iService = load_registry_service(service);
- }
-
if (iService >= 0) {
if (!VALID_SNUM(iService)) {
DEBUG(0,("Invalid snum %d for %s\n",iService, service));
@@ -789,6 +782,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser,
conn->veto_list = NULL;
conn->hide_list = NULL;
conn->veto_oplock_list = NULL;
+ conn->aio_write_behind_list = NULL;
string_set(&conn->dirpath,"");
string_set(&conn->user,user);