aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil/privileges.c
AgeCommit message (Collapse)AuthorFilesLines
2018-05-16Eliminate some unneeded header checks.Guy Harris1-3/+1
sys/stat.h and sys/types.h date back to V7 UNIX, so they should be present on all UN*Xes, and we're assuming they're available on Windows, so, unless and until we ever support platforms that are neither UN*Xes nor Windows, we don't need to check for them. Remove the CMake checks for them, remove the HAVE_ values from cmakeconfig.h.in, and remove all tests for the HAVE_ values. Change-Id: I90bb2aab37958553673b03b52f4931d3b304b9d0 Reviewed-on: https://code.wireshark.org/review/27603 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-03-01Windows: Remove cruft for unsupported versonsGraham Bloice1-18/+1
Remove all the existing LoadDLL\GetProcAddress combinations that allowed conditional Win32 API usage if supported on the running OS version. All the required functions are present in the versions we support. Change-Id: Ibc43e51cefcd1c7562d4e251784362509f224ed6 Reviewed-on: https://code.wireshark.org/review/26215 Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2018-02-08replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.Dario Lombardo1-1/+1
The first is deprecated, as per https://spdx.org/licenses/. Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed Reviewed-on: https://code.wireshark.org/review/25661 Petri-Dish: Anders Broman <a.broman58@gmail.com> Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-10Convert to using use SPDX identifier on wsutil directoryMichael Mann1-13/+1
Change-Id: Id73e641499e75bc1afc1dea29682418156f461fe Reviewed-on: https://code.wireshark.org/review/24751 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-05A bunch of "{Mac} OS X" -> "macOS" changes.Guy Harris1-1/+1
Avoid anachronisms, however; there was no "macOS 10.0" or even "OS X 10.0", for example. It was "Mac OS X" until 10.8 (although 10.7 was sometimes called "OS X" and sometimes called "Mac OS X"), and it was "OS X" from 10.8 to 10.11. Change-Id: Ie4a848997dcc6c45c2245c1fb84ec526032375c3 Reviewed-on: https://code.wireshark.org/review/20933 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-03Move npf_sys_is_running() from wsutil to caputils.Guy Harris1-29/+0
It has nothing to do with controlling privileges; it only tests whether the NPF or Npcap service (driver) is running, so it belongs in caputils. While we're at it, fix its signature (in C, a function with no arguments must have "void" as the argument list, for backwards compatibility with pre-function-prototype C), and close the handles it opens, so we don't have open handles leaked. Change-Id: Ia99e99d81617ed2e8cda2c44e53061b4502a2b58 Reviewed-on: https://code.wireshark.org/review/15714 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-03Add support for Npcap native mode:Yang Luo1-2/+5
1) Start Npcap service for capturing packets on Windows if WinPcap service is unavailable. 2) Search Npcap DLLs (wpcap.dll, Packet.dll) also in "system32\Npcap" folder after "system32" is searched. Change-Id: I6810382db431a4e7fe309edd08757db60d8ade38 Reviewed-on: https://code.wireshark.org/review/15707 Reviewed-by: Yang Luo <hsluoyz@gmail.com> Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-28Removed duplicated #include linesDario Lombardo1-1/+0
Change-Id: I9cafa3cd5c74121168777d8c656e7e94e89efd3c Reviewed-on: https://code.wireshark.org/review/6065 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-30Clean up a comment.Guy Harris1-1/+1
SetProcessDEPPolicy() is the API; PSetProcessDEPPolicy is just a local pointer variable that either points to that API's implementation (if it's available) or is null (if it isn't). Change-Id: I676fbb75019e32af511cefa6f1c7b7124ac9d8e8 Reviewed-on: https://code.wireshark.org/review/2735 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2012-12-21Squelch some cast-discard warnings.Guy Harris1-1/+1
svn path=/trunk/; revision=46647
2012-10-03*nix: Test return status of set*uid and related set*gid fcns for failure;Bill Meier1-8/+20
This fixes gcc compiler errors [-Werror=unused-result] caused by the recent addition of the "__wur" (warn_unused_result) attribute to the declarations of these functions in unistd.h. svn path=/trunk/; revision=45286
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45015
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2011-09-21Fix ex "modeline" so it works;Bill Meier1-2/+2
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748 svn path=/trunk/; revision=39081
2011-08-17From Gisle Vanem: Make sure our SetProcessDEPPolicyHandler typedefGerald Combs1-2/+3
matches the documentation. I also verified that DEP is still enabled on Win32 using Process Explorer. svn path=/trunk/; revision=38583
2011-02-17Squelch a warning from the MSVC++ static analyzer (it's worried thatGuy Harris1-5/+29
GetModuleHandle() could return a null pointer, which is possible, although if it returns one when handed "kernel32.dll", you have bigger problems...). Add some comments. svn path=/trunk/; revision=35972
2010-09-16More typos.Gerald Combs1-3/+3
svn path=/trunk/; revision=34139
2010-09-16Fix a typo.Gerald Combs1-1/+1
svn path=/trunk/; revision=34138
2010-09-16Turn on ASLR via /DYNAMICBASE and DEP via SetProcessDEPPolicy().Gerald Combs1-5/+16
svn path=/trunk/; revision=34137
2008-06-30Move privileges.c and unicode-utils.c from epan to wsutil (so things likeJeff Morriss1-0/+301
capinfos and dumpcap don't need to depend on libwireshark nor directly pull in those modules). Because capinfos and editcap were only being linked with privileges.c if we had plugins, this allows those programs to be linked when someone is compiling --without-plugins. svn path=/trunk/; revision=25640