[NETAPI32]
authorEric Kohl <eric.kohl@reactos.org>
Wed, 12 Jun 2013 21:37:31 +0000 (21:37 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Wed, 12 Jun 2013 21:37:31 +0000 (21:37 +0000)
NetLocalGroupSetInfo: Implement level 1.

svn path=/trunk/; revision=59206

reactos/dll/win32/netapi32/local_group.c

index 6a8ba80..8a34f0e 100644 (file)
@@ -1718,7 +1718,7 @@ NetLocalGroupSetInfo(
     SAM_HANDLE DomainHandle = NULL;
     SAM_HANDLE AliasHandle = NULL;
     ALIAS_NAME_INFORMATION AliasNameInfo;
-
+    ALIAS_ADM_COMMENT_INFORMATION AdminCommentInfo;
     NET_API_STATUS ApiStatus = NERR_Success;
     NTSTATUS Status = STATUS_SUCCESS;
 
@@ -1816,6 +1816,22 @@ NetLocalGroupSetInfo(
             }
             break;
 
+        case 1:
+            /* Set the alias admin comment */
+            RtlInitUnicodeString(&AdminCommentInfo.AdminComment,
+                                 ((PLOCALGROUP_INFO_1)buf)->lgrpi1_comment);
+
+            Status = SamSetInformationAlias(AliasHandle,
+                                            AliasAdminCommentInformation,
+                                            &AdminCommentInfo);
+            if (!NT_SUCCESS(Status))
+            {
+                TRACE("SamSetInformationAlias failed (ApiStatus %lu)\n", ApiStatus);
+                ApiStatus = NetpNtStatusToApiStatus(Status);
+                goto done;
+            }
+            break;
+
         default:
             ApiStatus = ERROR_INVALID_LEVEL;
             goto done;