Correct calculation of "remark" in srv_srvsvc_nt.c
authorVolker Lendecke <vl@samba.org>
Mon, 23 Jun 2008 06:33:04 +0000 (08:33 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 24 Jun 2008 08:31:35 +0000 (10:31 +0200)
Very likely the client is not interested in the values for the IPC$ share :-)
(This used to be commit 40ca5764cf4310769c002b8cb6041fe2af4e6d0b)

source3/rpc_server/srv_srvsvc_nt.c

index 6f7b2320715d98e840340981059d196dfe15c47a..57f2fe7f65e96a057f4bf9409eafaed4b94dbea1 100644 (file)
@@ -259,9 +259,11 @@ static void init_srv_share_info_1(pipes_struct *p, struct srvsvc_NetShareInfo1 *
        char *remark = talloc_strdup(p->mem_ctx, lp_comment(snum));
 
        if (remark) {
-               remark = standard_sub_conn(p->mem_ctx,
-                               p->conn,
-                               remark);
+               remark = talloc_sub_advanced(
+                       p->mem_ctx, lp_servicename(snum),
+                       get_current_username(), lp_pathname(snum),
+                       p->pipe_user.ut.uid, get_current_username(),
+                       "", remark);
        }
 
        init_srvsvc_NetShareInfo1(r, net_name,
@@ -284,9 +286,11 @@ static void init_srv_share_info_2(pipes_struct *p, struct srvsvc_NetShareInfo2 *
 
        remark = talloc_strdup(p->mem_ctx, lp_comment(snum));
        if (remark) {
-               remark = standard_sub_conn(p->mem_ctx,
-                               p->conn,
-                               remark);
+               remark = talloc_sub_advanced(
+                       p->mem_ctx, lp_servicename(snum),
+                       get_current_username(), lp_pathname(snum),
+                       p->pipe_user.ut.uid, get_current_username(),
+                       "", remark);
        }
        path = talloc_asprintf(p->mem_ctx,
                        "C:%s", lp_pathname(snum));
@@ -348,7 +352,11 @@ static void init_srv_share_info_501(pipes_struct *p, struct srvsvc_NetShareInfo5
        char *remark = talloc_strdup(p->mem_ctx, lp_comment(snum));
 
        if (remark) {
-               remark = standard_sub_conn(p->mem_ctx, p->conn, remark);
+               remark = talloc_sub_advanced(
+                       p->mem_ctx, lp_servicename(snum),
+                       get_current_username(), lp_pathname(snum),
+                       p->pipe_user.ut.uid, get_current_username(),
+                       "", remark);
        }
 
        init_srvsvc_NetShareInfo501(r, net_name,
@@ -372,7 +380,11 @@ static void init_srv_share_info_502(pipes_struct *p, struct srvsvc_NetShareInfo5
        char *remark = talloc_strdup(ctx, lp_comment(snum));;
 
        if (remark) {
-               remark = standard_sub_conn(ctx, p->conn, remark);
+               remark = talloc_sub_advanced(
+                       p->mem_ctx, lp_servicename(snum),
+                       get_current_username(), lp_pathname(snum),
+                       p->pipe_user.ut.uid, get_current_username(),
+                       "", remark);
        }
        path = talloc_asprintf(ctx, "C:%s", lp_pathname(snum));
        if (path) {
@@ -407,7 +419,11 @@ static void init_srv_share_info_1004(pipes_struct *p, struct srvsvc_NetShareInfo
        char *remark = talloc_strdup(p->mem_ctx, lp_comment(snum));
 
        if (remark) {
-               remark = standard_sub_conn(p->mem_ctx, p->conn, remark);
+               remark = talloc_sub_advanced(
+                       p->mem_ctx, lp_servicename(snum),
+                       get_current_username(), lp_pathname(snum),
+                       p->pipe_user.ut.uid, get_current_username(),
+                       "", remark);
        }
 
        init_srvsvc_NetShareInfo1004(r, remark ? remark : "");