r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
[samba.git] / source3 / passdb / util_wellknown.c
index be3cf3744695005752c0c1f50b2817c8d9ba0246..f4595709d80e1911e2421d74812e96805c068a41 100644 (file)
@@ -8,7 +8,7 @@
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
@@ -17,8 +17,7 @@
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "includes.h"
@@ -85,6 +84,17 @@ BOOL sid_check_is_wellknown_domain(const DOM_SID *sid, const char **name)
        return False;
 }
 
+BOOL sid_check_is_in_wellknown_domain(const DOM_SID *sid)
+{
+       DOM_SID dom_sid;
+       uint32 rid;
+
+       sid_copy(&dom_sid, sid);
+       sid_split_rid(&dom_sid, &rid);
+       
+       return sid_check_is_wellknown_domain(&dom_sid, NULL);
+}
+
 /**************************************************************************
  Looks up a known username from one of the known domains.
 ***************************************************************************/