[editrights - A helper tool to change user privileges] branch master, updated. 52e751bd201e3689537f554ba1e6b82685848b9b

Corinna Vinschen corinna@sourceware.org
Tue Feb 7 19:08:51 GMT 2023




https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/editrights.git;h=52e751bd201e3689537f554ba1e6b82685848b9b

commit 52e751bd201e3689537f554ba1e6b82685848b9b
Author: Corinna Vinschen <vinschen@redhat.com>
Date:   Tue Feb 7 19:33:31 2023 +0100

    bump version to 1.04

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/editrights.git;h=37fa4ad3b7cf2bd24064a24d76d1fd86d668d804

commit 37fa4ad3b7cf2bd24064a24d76d1fd86d668d804
Author: Corinna Vinschen <vinschen@redhat.com>
Date:   Tue Feb 7 19:45:34 2023 +0100

    fix build


Diff:
---
 Makefile | 15 ++++++++++-----
 main.c   |  7 +++----
 2 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile
index 6727a98f2f51..6b87a5ca2afa 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,10 @@
+srcdir=.
+VPATH=${srcdir}
+
 DESTDIR=
-PREFIX=/usr
-BINDIR=$(PREFIX)/bin
-DOCDIR=$(PREFIX)/share/doc/Cygwin
+prefix=/usr
+bindir=$(prefix)/bin
+docdir=$(prefix)/share/doc/Cygwin
 
 EXEEXT=.exe
 OBJ=	main.o \
@@ -11,8 +14,10 @@ editrights$(EXEEXT): $(OBJ)
 	$(CC) $(LDFLAGS) -o $@ $(OBJ)
 
 install: editrights$(EXEEXT)
-	install -D -m 755 editrights$(EXEEXT) $(DESTDIR)$(BINDIR)/editrights$(EXEEXT)
-	install -D -m 644 editrights.README $(DESTDIR)$(DOCDIR)/editrights.README
+	-mkdir -p $(DESTDIR)$(bindir)
+	install -m 755 editrights$(EXEEXT) $(DESTDIR)$(bindir)/editrights$(EXEEXT)
+	-mkdir -p $(DESTDIR)$(docdir)
+	install -m 644 $(srcdir)/editrights.README $(DESTDIR)$(docdir)/editrights.README
 
 clean:
 	rm -f editrights$(EXEEXT) core editrights$(EXEEXT).stackdump *.o
diff --git a/main.c b/main.c
index 2ef009e3aedc..0ada707d3e8d 100644
--- a/main.c
+++ b/main.c
@@ -1,5 +1,5 @@
 /***************************************************************************
-* editrights version 1.02: a cygwin application to edit user
+* editrights version 1.04: a cygwin application to edit user
 *                          rights on a windows NT system
 * 
 * Copyright (c) 2003, Chris Rodgers <editrights-at-bulk.rodgers.org.uk>
@@ -95,7 +95,6 @@ main (int argc, char **argv)
   PSID sid = NULL;
 
   /* variables for getopt logic */
-  int index;
   int c;
 
   /* main variables */
@@ -294,7 +293,7 @@ void
 printCopyright ()
 {
   printf
-    ("editrights version 1.03: a cygwin application to edit user rights\n                         on a Windows NT system.\n");
+    ("editrights version 1.04: a cygwin application to edit user rights\n                         on a Windows NT system.\n");
   printf
     ("Copyright Chris Rodgers <editrights-at-bulk.rodgers.org.uk>, Sep, 2003.\nAll rights reserved. See LICENCE for further details.\n\n");
 }
@@ -432,7 +431,7 @@ testUserRights (LSA_HANDLE hLSA, const char *strUser, PSID Sid,
       rightname[wcsrtombs (rightname, &src, len, &mbst)] = '\0';
       for (d = 0; d < intRightsToTestCount; d++)
 	{
-	  if (!stricmp (rightname, strRightsToTest[d]))
+	  if (!strcasecmp (rightname, strRightsToTest[d]))
 	    intMatched++;
 	}
     }



More information about the Cygwin-apps-cvs mailing list